public class PrimitiveDataType extends DataType
Modifier and Type | Class and Description |
---|---|
static class |
PrimitiveDataType.Factory |
Modifier and Type | Field and Description |
---|---|
static int |
classId |
private PrimitiveDataType.Factory |
factory |
private Class<? extends FieldValue> |
valueClass |
Modifier | Constructor and Description |
---|---|
protected |
PrimitiveDataType(String name,
int code,
Class<? extends FieldValue> valueClass,
PrimitiveDataType.Factory factory)
Creates a datatype
|
Modifier and Type | Method and Description |
---|---|
PrimitiveDataType |
clone() |
FieldValue |
createFieldValue()
Creates a new, empty FieldValue of this type
|
PrimitiveDataType |
getPrimitiveType()
Returns the primitive datatype associated with this datatype, i.e.
|
Class<? extends FieldValue> |
getValueClass() |
boolean |
isValueCompatible(FieldValue value) |
void |
visitMembers(com.yahoo.vespa.objects.ObjectVisitor visitor) |
buildFieldPath, compareTo, createByReflection, createFieldValue, equals, getArray, getCode, getId, getMap, getName, getTensor, getWeightedSet, getWeightedSet, hashCode, isAssignableFrom, isMultivalue, isRegistered, lastPredefinedDataTypeId, register, register, setId, setName, setRegistered, skipDotInString, toString
public static final int classId
private final Class<? extends FieldValue> valueClass
private final PrimitiveDataType.Factory factory
protected PrimitiveDataType(String name, int code, Class<? extends FieldValue> valueClass, PrimitiveDataType.Factory factory)
name
- the name of the typecode
- the code (id) of the typefactory
- the factory for creating field values of this typepublic PrimitiveDataType clone()
public FieldValue createFieldValue()
DataType
createFieldValue
in class DataType
public Class<? extends FieldValue> getValueClass()
getValueClass
in class DataType
public boolean isValueCompatible(FieldValue value)
isValueCompatible
in class DataType
public PrimitiveDataType getPrimitiveType()
DataType
getPrimitiveType
in class DataType
public void visitMembers(com.yahoo.vespa.objects.ObjectVisitor visitor)
visitMembers
in class DataType
Copyright © 2018. All rights reserved.