@Override
    public boolean isValueCompatible(FieldValue value) {
        return value != null && valueClass.isAssignableFrom(value.getClass());
    }
Creates a datatype

@param name     the name of the type
@param code     the code (id) of the type
@param factory  the factory for creating field values of this type
document/src/main/java/com/yahoo/document/PrimitiveDataType.java