Package io.tarantool.driver.core.tuple
Class TarantoolFieldImpl
- java.lang.Object
-
- io.tarantool.driver.core.tuple.TarantoolFieldImpl
-
- All Implemented Interfaces:
TarantoolField
,Packable
,Serializable
public class TarantoolFieldImpl extends Object implements TarantoolField
Basic tuple field implementation- See Also:
- Serialized Form
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
canConvertValue(Class<?> targetClass, MessagePackValueMapper mapper)
Check whether the underlying field value can be converted to an object using the given MessagePack-to-object mapperboolean
equals(Object o)
Object
getValue(MessagePackValueMapper mapper)
Get the field value, possibly converted to some Java type<O> O
getValue(Class<O> targetClass, MessagePackValueMapper mapper)
Get the field value converted to the target typeint
hashCode()
org.msgpack.value.Value
toMessagePackValue(MessagePackObjectMapper mapper)
Convert this instance into a corresponding MessagePackValue
-
-
-
Method Detail
-
toMessagePackValue
public org.msgpack.value.Value toMessagePackValue(MessagePackObjectMapper mapper)
Description copied from interface:Packable
Convert this instance into a corresponding MessagePackValue
- Specified by:
toMessagePackValue
in interfacePackable
- Parameters:
mapper
- configured Java objects to entities mapper- Returns:
- MessagePack entity
-
getValue
public <O> O getValue(Class<O> targetClass, MessagePackValueMapper mapper)
Description copied from interface:TarantoolField
Get the field value converted to the target type- Specified by:
getValue
in interfaceTarantoolField
- Type Parameters:
O
- the target type- Parameters:
targetClass
- the target type classmapper
- mapper for converting MessagePack entity to Java object- Returns:
- value
-
getValue
public Object getValue(MessagePackValueMapper mapper)
Description copied from interface:TarantoolField
Get the field value, possibly converted to some Java type- Specified by:
getValue
in interfaceTarantoolField
- Parameters:
mapper
- mapper for converting MessagePack entity to Java object- Returns:
- value
-
canConvertValue
public boolean canConvertValue(Class<?> targetClass, MessagePackValueMapper mapper)
Description copied from interface:TarantoolField
Check whether the underlying field value can be converted to an object using the given MessagePack-to-object mapper- Specified by:
canConvertValue
in interfaceTarantoolField
- Parameters:
targetClass
- the target type classmapper
- mapper for converting MessagePack entity to Java object- Returns:
- value
-
-