The method implements finding a field object in the 'fieldsList' with a given name. If found, return the found field object, otherwise return null.
Thus, rename the method as "findsField" should be more clear than "containsField" since "containsField" is prone to ask whether the "fieldsFile" contains a field or not and return true or false.
Signed-off-by: Kui Liu <brucekuiliu@gmail.com>
/**
* @return field object with given name, or null if not found
*/
- public Field containsField(String name) {
+ public Field findsField(String name) {
for (Field field : fieldsList) {
if (field.getName().equals(name)) {
return field;