protected static final class Tuples.Tuple2TypeFactory<T1,T2> extends Object implements TypeSystem.TypeFactory<Tuples.Tuple2<T1,T2>>, Tuples.TupleFactory<Tuples.Tuple2<T1,T2>>
Modifier | Constructor and Description |
---|---|
protected |
Tuple2TypeFactory(TypeSystem.TypeFactory<T1> type1,
TypeSystem.TypeFactory<T2> type2) |
Modifier and Type | Method and Description |
---|---|
String |
asReadableString(Object value)
Get a readable and potentially shorter string representation of the supplied value.
|
String |
asString(Object value)
Get the string representation of the supplied value.
|
Tuples.Tuple2<T1,T2> |
create(Object value)
Create the typed representation of the value given the supplied object representation.
|
Tuples.Tuple2<T1,T2> |
create(String value)
Create the typed representation of the value given the supplied string representation.
|
Comparator<Tuples.Tuple2<T1,T2>> |
getComparator()
Get a comparator that can be used to store the values of this type.
|
org.mapdb.Serializer<Tuples.Tuple2<T1,T2>> |
getSerializer(BufferManager bufferMgr) |
Class<Tuples.Tuple2<T1,T2>> |
getType()
Get the class representing the value type.
|
String |
getTypeName()
Get the name of the type created by this factory.
|
long |
length(Object value)
Get the length of the supplied value.
|
protected Tuple2TypeFactory(TypeSystem.TypeFactory<T1> type1, TypeSystem.TypeFactory<T2> type2)
public org.mapdb.Serializer<Tuples.Tuple2<T1,T2>> getSerializer(BufferManager bufferMgr)
getSerializer
in interface Tuples.TupleFactory<Tuples.Tuple2<T1,T2>>
public Class<Tuples.Tuple2<T1,T2>> getType()
TypeSystem.TypeFactory
getType
in interface TypeSystem.TypeFactory<Tuples.Tuple2<T1,T2>>
public Comparator<Tuples.Tuple2<T1,T2>> getComparator()
TypeSystem.TypeFactory
getComparator
in interface TypeSystem.TypeFactory<Tuples.Tuple2<T1,T2>>
public String getTypeName()
TypeSystem.TypeFactory
getTypeName
in interface TypeSystem.TypeFactory<Tuples.Tuple2<T1,T2>>
public Tuples.Tuple2<T1,T2> create(String value) throws ValueFormatException
TypeSystem.TypeFactory
create
in interface TypeSystem.TypeFactory<Tuples.Tuple2<T1,T2>>
value
- the string representation of the valuetype
ValueFormatException
- if the string cannot be converted to a typed valuepublic Tuples.Tuple2<T1,T2> create(Object value) throws ValueFormatException
TypeSystem.TypeFactory
create
in interface TypeSystem.TypeFactory<Tuples.Tuple2<T1,T2>>
value
- the object representation of the valuetype
ValueFormatException
- if the object cannot be converted to a typed valuepublic String asString(Object value)
TypeSystem.TypeFactory
asString
in interface TypeSystem.TypeFactory<Tuples.Tuple2<T1,T2>>
value
- the valuepublic long length(Object value)
TypeSystem.TypeFactory
length
in interface TypeSystem.TypeFactory<Tuples.Tuple2<T1,T2>>
value
- the valuepublic String asReadableString(Object value)
TypeSystem.TypeFactory
asReadableString
in interface TypeSystem.TypeFactory<Tuples.Tuple2<T1,T2>>
value
- the valueCopyright © 2008–2016 JBoss, a division of Red Hat. All rights reserved.