public class StructDataType extends BaseStructDataType
Modifier and Type | Field and Description |
---|---|
static int |
classId |
private StructDataType |
superType |
compressor, fieldIds, fieldIdsV6, fields
Constructor and Description |
---|
StructDataType(int id,
String name) |
StructDataType(String name) |
Modifier and Type | Method and Description |
---|---|
void |
addField(Field field) |
void |
assign(StructDataType type) |
StructDataType |
clone() |
Struct |
createFieldValue()
Creates a new, empty FieldValue of this type
|
FieldValue |
createFieldValue(Object o)
Creates a new FieldValue of this type, with the given value.
|
boolean |
equals(Object o) |
Field |
getField(int id)
Gets the field with the specified id.
|
Field |
getField(Integer fieldId,
int version) |
Field |
getField(String fieldName)
Gets the field matching a given name.
|
int |
getFieldCount() |
Collection<Field> |
getFields() |
Collection<Field> |
getFieldsThisTypeOnly() |
Collection<StructDataType> |
getInheritedTypes() |
Class |
getValueClass() |
boolean |
hasField(Field field,
int version) |
int |
hashCode() |
void |
inherit(StructDataType type) |
boolean |
inherits(StructDataType type) |
boolean |
isValueCompatible(FieldValue value) |
assign, clearFields, getCompressionConfig, getCompressor, hasField, hasField, removeField, setCompressionConfig
buildFieldPath, createByReflection, createId, getDataTypeName, register
compareTo, getArray, getCode, getId, getMap, getName, getPrimitiveType, getTensor, getWeightedSet, getWeightedSet, isAssignableFrom, isMultivalue, isRegistered, lastPredefinedDataTypeId, register, setId, setName, setRegistered, skipDotInString, toString, visitMembers
public static final int classId
private StructDataType superType
public StructDataType(String name)
public StructDataType(int id, String name)
public Struct createFieldValue()
DataType
createFieldValue
in class StructuredDataType
public FieldValue createFieldValue(Object o)
DataType
createFieldValue
in class DataType
o
- the value of the new FieldValuepublic StructDataType clone()
clone
in class BaseStructDataType
public void assign(StructDataType type)
public Field getField(Integer fieldId, int version)
getField
in class BaseStructDataType
public Field getField(String fieldName)
StructuredDataType
getField
in class BaseStructDataType
fieldName
- The name of a field.public Field getField(int id)
StructuredDataType
getField
in class BaseStructDataType
id
- the id of the field to return.public void addField(Field field)
addField
in class BaseStructDataType
public boolean hasField(Field field, int version)
hasField
in class BaseStructDataType
public Collection<Field> getFields()
getFields
in class BaseStructDataType
public Collection<Field> getFieldsThisTypeOnly()
public int getFieldCount()
getFieldCount
in class BaseStructDataType
public Class getValueClass()
getValueClass
in class DataType
public boolean isValueCompatible(FieldValue value)
isValueCompatible
in class DataType
public void inherit(StructDataType type)
public Collection<StructDataType> getInheritedTypes()
public boolean inherits(StructDataType type)
public boolean equals(Object o)
equals
in class StructuredDataType
public int hashCode()
hashCode
in class StructuredDataType
Copyright © 2017. All rights reserved.