public abstract class BaseStructDataType extends StructuredDataType
Modifier and Type | Field and Description |
---|---|
protected com.yahoo.compress.Compressor |
compressor |
protected Map<Integer,Field> |
fieldIds |
protected Map<Integer,Field> |
fieldIdsV6 |
protected Map<String,Field> |
fields |
classId
Constructor and Description |
---|
BaseStructDataType(int id,
String name) |
BaseStructDataType(String name) |
Modifier and Type | Method and Description |
---|---|
void |
addField(Field field) |
protected void |
assign(BaseStructDataType type) |
void |
clearFields() |
BaseStructDataType |
clone() |
CompressionConfig |
getCompressionConfig()
Returns a view of the configuration of the compressor used to compress this type
|
com.yahoo.compress.Compressor |
getCompressor()
Returns the compressor to use to compress data of this type
|
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() |
boolean |
hasField(Field f) |
boolean |
hasField(Field field,
int version) |
boolean |
hasField(String name) |
Field |
removeField(String fieldName) |
void |
setCompressionConfig(CompressionConfig config)
Set the config to the compressor used to compress data of this type
|
buildFieldPath, createByReflection, createFieldValue, createId, equals, getDataTypeName, hashCode, register
compareTo, createFieldValue, getArray, getCode, getId, getMap, getName, getPrimitiveType, getTensor, getValueClass, getWeightedSet, getWeightedSet, isAssignableFrom, isMultivalue, isRegistered, isValueCompatible, lastPredefinedDataTypeId, register, setId, setName, setRegistered, skipDotInString, toString, visitMembers
BaseStructDataType(String name)
BaseStructDataType(int id, String name)
protected void assign(BaseStructDataType type)
public BaseStructDataType clone()
public void addField(Field field)
public void clearFields()
public Field getField(String fieldName)
StructuredDataType
getField
in class StructuredDataType
fieldName
- The name of a field.public Field getField(int id)
StructuredDataType
getField
in class StructuredDataType
id
- the id of the field to return.public boolean hasField(Field field, int version)
public boolean hasField(String name)
public boolean hasField(Field f)
public Collection<Field> getFields()
getFields
in class StructuredDataType
public int getFieldCount()
public com.yahoo.compress.Compressor getCompressor()
public CompressionConfig getCompressionConfig()
public void setCompressionConfig(CompressionConfig config)
Copyright © 2018. All rights reserved.