Identify unexpected field
@param field unexpected field
@param actual actual result
@return result of comparison
187076
public JSONCompareResult unexpected(String field, Object actual) {
    	_fieldUnexpected.add(new FieldComparisonFailure(field, null, actual));
        fail(formatUnexpected(field, actual));
        return this;
    }
510364
public boolean isSet(_Fields field) {
    if (field == null) {
      throw new IllegalArgumentException();
    }

    switch (field) {
    case TYPE:
      return isSetType();
    case ROWS:
      return isSetRows();
    case NUM:
      return isSetNum();
    case SCHEMA:
      return isSetSchema();
    }
    throw new IllegalStateException();
  }
1333258
public boolean isSet(_Fields field) {
    if (field == null) {
      throw new IllegalArgumentException();
    }

    switch (field) {
    case TYPES:
      return isSetTypes();
    }
    throw new IllegalStateException();
  }
971207
@Override
    protected boolean isMatching(final Field field) {

        if (!super.isMatching(field)) {
            return false;
        }

        final Resource resourceAnnotation = field.getAnnotation(Resource.class);
        if (resourceAnnotation == null) {
            return false;
        }

        return matchesResourceAnnotation(resourceAnnotation);
    }
917818
private boolean unequal(Object expected, Object actual) {
        return expected==null ? actual!=null : unequalNotNull(expected, actual);
    }
662485
public boolean isSet(_Fields field) {
    if (field == null) {
      throw new IllegalArgumentException();
    }

    switch (field) {
    case OPERATION_ID:
      return isSetOperationId();
    case OPERATION_TYPE:
      return isSetOperationType();
    case HAS_RESULT_SET:
      return isSetHasResultSet();
    case MODIFIED_ROW_COUNT:
      return isSetModifiedRowCount();
    }
    throw new IllegalStateException();
  }
343935
public boolean isSet(_Fields field) {
    if (field == null) {
      throw new IllegalArgumentException();
    }

    switch (field) {
    case START:
      return isSetStart();
    case FINISH:
      return isSetFinish();
    case REVERSED:
      return isSetReversed();
    case COUNT:
      return isSetCount();
    }
    throw new IllegalStateException();
  }
1326877
function assertValidFieldType(pojoName, fieldName, pojo, expectedType) {
    var value = pojo[fieldName];
    var actualType = typeof value;
    if (value === undefined || value === null) {
        return;
    }
    switch (expectedType) {
        case BOOLEAN_TYPE:
            if (actualType !== BOOLEAN_TYPE && actualType !== NUMBER_TYPE) {
                err();
            }
            pojo[fieldName] = Boolean(value);
            return;
        case NUMBER_TYPE:
            if (actualType === NUMBER_TYPE) {
                return;
            }
            if (actualType === STRING_TYPE) {
                var newValue = parseFloat(value);
                if (isNaN(newValue)) {
                    err();
                }
                pojo[fieldName] = newValue;
            }
            return;
        case STRING_TYPE:
            if (actualType !== STRING_TYPE) {
                pojo[fieldName] = value.toString();
            }
            return;
        case DATE_EXPECTED_TYPE:
            var getTime = value.getTime;
            if (typeof getTime === FUNCTION_TYPE) {
                var timeValue = value.getTime();
                if (isNaN(timeValue)) {
                    err();
                }
                if (!(value instanceof Date)) {
                    pojo[fieldName] = new Date(timeValue);
                }
                return;
            }
            if (actualType === STRING_TYPE) {
                var newDate = new Date(value);
                if (!isNaN(newDate.getTime())) {
                    pojo[fieldName] = newDate;
                    return;
                }
            }
            err();
            return;
        case BUFFER_EXPECTED_TYPE:
            if (!BUFFER_EXISTS) {
                return;
            }
            if (!(value instanceof Buffer)) {
                err();
            }
            return;
    }
    // one pojo of array of array of pojos?
    if (expectedType.length > 3 && expectedType.substr(expectedType.length - 2, 2) === '[]') {
        var individualPojoType = expectedType.substr(0, expectedType.length - 6);
        var asserter_1 = asserters[individualPojoType];
        if (typeof asserter_1 !== FUNCTION_TYPE) {
            err();
        }
        if (isNaN(value.length)) {
            err();
        }
        for (var i = 0; i < value.length; i++) {
            try {
                asserter_1(value[i], true);
            }
            catch (e) {
                err('Error at index \'' + i + '\': ' + e.message);
            }
        }
        // all instances valid
        return;
    }
    var asserter = asserters[expectedType.substr(0, expectedType.length - 4)];
    if (typeof asserter !== FUNCTION_TYPE) {
        expectedTypeErr();
    }
    try {
        asserter(value, true);
    }
    catch (e) {
        err(e.message);
    }
    function err(extraMessage) {
        var message = 'Invalid ' + pojoName + ' provided. Field \'' + fieldName + '\' with value \'' + safeValue(value) + '\' is not a valid \'' + expectedType + '\'.';
        if (extraMessage !== undefined) {
            message += ' ' + extraMessage;
        }
        throw new Error(message);
    }
    function expectedTypeErr() {
        throw new Error('Cannot validate \'' + pojoName + '\' field \'' + fieldName + '\' since expected type provided \'' + expectedType + '\' is not understood.');
    }
}
290741
public static void assertNotFinal(final Field field, Class<? extends Annotation> annotation) 
   {
      if (Modifier.isFinal(field.getModifiers()))
      {
         throw annotation == null ? MESSAGES.fieldCannotBeStaticOrFinal(field) : MESSAGES.fieldCannotBeStaticOrFinal2(field, annotation);
      }
   }
1104107
@Override
    public int compareTo(final FieldInfo other) {
        final int diff = declaringClassName.compareTo(other.declaringClassName);
        if (diff != 0) {
            return diff;
        }
        return name.compareTo(other.name);
    }
722993
private boolean isComplex(final Field field) {
        final Class<?> declaringClass = field.getType();
        return (declaringClass.equals(List.class)
                || declaringClass.equals(Set.class)
                || declaringClass.equals(Map.class))
                || declaringClass.getTypeName().endsWith("[][]")
                || declaringClass.getTypeName().endsWith("[]");
    }
437004
public boolean isSet(_Fields field) {
    if (field == null) {
      throw new IllegalArgumentException();
    }

    switch (field) {
    case STATEMENT:
      return isSetStatement();
    case FETCH_SIZE:
      return isSetFetch_size();
    }
    throw new IllegalStateException();
  }
367214
public boolean isSet(_Fields field) {
    if (field == null) {
      throw new IllegalArgumentException();
    }

    switch (field) {
    case KEY_TYPE_PTR:
      return isSetKeyTypePtr();
    case VALUE_TYPE_PTR:
      return isSetValueTypePtr();
    }
    throw new IllegalStateException();
  }
1089858
private boolean matchesField(Format.Field attribute, int field) {
        if (this.attribute != null) {
            return this.attribute.equals(attribute);
        }
        return (field == this.field);
    }
261996
public int compareTo(Field field)
    {
        if (field instanceof BaseField) if (!this.isSameType((BaseField)field))
            return super.compareTo(field);
        short short1 = Short.MIN_VALUE, short2 = Short.MAX_VALUE;
        Short tempShort = (Short)this.getData();    // Get the physical data
        if (tempShort != null)
            short1 = tempShort.shortValue();
        tempShort = (Short)field.getData();   // Get the physical data
        if (tempShort != null)
            short2 = tempShort.shortValue();
        if (short1 == short2)
            return 0;
        if (short1 < short2)
            return -1;
        else
            return 1;
    }
1213462
public static boolean isSimilar(final String expected, final String actual) {
        final Diff diff = createDiffResult(expected, actual, true);

        return diff.similar();
    }
1230815
private boolean isCsvField(final String field, final ValidationContext<Object> validationContext) {
        return validationContext.getBeanMapping().getColumnMapping(field).isPresent();
    }