public class TypeAdaptor extends AbstractType
defaultValue, initialValue
operator, presence, requiresPMapFlag, types
Constructor and Description |
---|
TypeAdaptor(FieldTypeInstruction fieldTypeInstruction) |
Modifier and Type | Method and Description |
---|---|
ITypeValue |
createValue(String stringValue) |
ITypeValue |
createValue(String id,
String stringValue) |
ITypeValue |
decodeConstant(Context context,
BinaryMessage message)
Decodes value from stream with constant operator.
|
ITypeValue |
decodeCopy(Context context,
BinaryMessage message)
Decodes value from stream with copy operator.
|
ITypeValue |
decodeDefault(Context context,
BinaryMessage message)
Decodes value from stream with default operator.
|
ITypeValue |
decodeDelta(Context context,
BinaryMessage message)
Decodes value from stream with delta operator.
|
ITypeValue |
decodeIncrement(Context context,
BinaryMessage message)
Decodes value from stream with increment operator.
|
protected ITypeValue |
decodeInternal(BinaryMessage message) |
ITypeValue |
decodeNone(Context context,
BinaryMessage message)
Decodes value from stream with none operator.
|
ITypeValue |
decodeTail(Context context,
BinaryMessage message)
Decodes value from stream with tail operator.
|
byte[] |
encodeConstant(ITypeValue value,
Context context,
EncodePresenceMapBuilder presenceMapBuilder)
Encodes value with constant operator.
|
byte[] |
encodeCopy(ITypeValue value,
Context context,
EncodePresenceMapBuilder presenceMapBuilder)
Encodes value with copy operator.
|
byte[] |
encodeDefault(ITypeValue value,
Context context,
EncodePresenceMapBuilder presenceMapBuilder)
Encodes value with default operator.
|
byte[] |
encodeDelta(ITypeValue value,
Context context,
EncodePresenceMapBuilder presenceMapBuilder)
Encodes value with delta operator.
|
byte[] |
encodeIncrement(ITypeValue value,
Context context,
EncodePresenceMapBuilder presenceMapBuilder)
Encodes value with increment operator.
|
protected byte[] |
encodeInternal(ITypeValue encodingValue) |
byte[] |
encodeNone(ITypeValue value,
Context context,
EncodePresenceMapBuilder presenceMapBuilder)
Encodes value with none operator.
|
byte[] |
encodeTail(ITypeValue value,
Context context,
EncodePresenceMapBuilder presenceMapBuilder)
Encodes value with tail operator.
|
ITypeValue |
getInitialValue()
Gets the initial value for type.
|
assignOperator, decode, encode, getCoderType, getDefaultValue, getDictionary, getIndex, getNullValue, setDictionary, setIndex
compareTo, getId, getIdInteger, getName, getOperator, getPresence, getTypes, isOptional, requiresPMap, setId, setName, setOperator, setOptional, setPresence, setTypes, toString
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
requiresPMap
getId, getIdInteger, getName, isOptional, setOptional
compareTo
public TypeAdaptor(FieldTypeInstruction fieldTypeInstruction)
public byte[] encodeDefault(ITypeValue value, Context context, EncodePresenceMapBuilder presenceMapBuilder)
TypeEncoder
value
- the valuecontext
- the contextpresenceMapBuilder
- the PM Mappublic ITypeValue decodeDefault(Context context, BinaryMessage message)
TypeDecoder
context
- the contextmessage
- the stream messagepublic byte[] encodeDelta(ITypeValue value, Context context, EncodePresenceMapBuilder presenceMapBuilder)
TypeEncoder
value
- the valuecontext
- the contextpresenceMapBuilder
- the PM Mappublic ITypeValue decodeDelta(Context context, BinaryMessage message)
TypeDecoder
context
- the contextmessage
- the stream messagepublic byte[] encodeCopy(ITypeValue value, Context context, EncodePresenceMapBuilder presenceMapBuilder)
TypeEncoder
value
- the valuecontext
- the contextpresenceMapBuilder
- the PM Mappublic ITypeValue decodeCopy(Context context, BinaryMessage message)
TypeDecoder
context
- the contextmessage
- the stream messagepublic byte[] encodeIncrement(ITypeValue value, Context context, EncodePresenceMapBuilder presenceMapBuilder)
TypeEncoder
value
- the valuecontext
- the contextpresenceMapBuilder
- the PM Mappublic ITypeValue decodeIncrement(Context context, BinaryMessage message)
TypeDecoder
context
- the contextmessage
- the stream messagepublic byte[] encodeConstant(ITypeValue value, Context context, EncodePresenceMapBuilder presenceMapBuilder)
TypeEncoder
context
- the contextpresenceMapBuilder
- the PM Mappublic ITypeValue decodeConstant(Context context, BinaryMessage message)
TypeDecoder
context
- the contextmessage
- the stream messagepublic byte[] encodeTail(ITypeValue value, Context context, EncodePresenceMapBuilder presenceMapBuilder)
TypeEncoder
value
- the valuecontext
- the contextpresenceMapBuilder
- the PM Mappublic ITypeValue decodeTail(Context context, BinaryMessage message)
TypeDecoder
context
- the contextmessage
- the stream messagepublic byte[] encodeNone(ITypeValue value, Context context, EncodePresenceMapBuilder presenceMapBuilder)
TypeEncoder
value
- the valuecontext
- the contextpresenceMapBuilder
- the PM Mappublic ITypeValue decodeNone(Context context, BinaryMessage message)
TypeDecoder
context
- the contextmessage
- the stream messageprotected ITypeValue decodeInternal(BinaryMessage message)
decodeInternal
in class AbstractType
protected byte[] encodeInternal(ITypeValue encodingValue)
encodeInternal
in class AbstractType
public ITypeValue createValue(String id, String stringValue)
public ITypeValue createValue(String stringValue)
public ITypeValue getInitialValue()
ModelType
Copyright © 2000-2017 EPAM Systems. All Rights Reserved.