protected static final class Tuples.TupleNTypeFactory extends Object implements TypeSystem.TypeFactory<Tuples.TupleN>, Tuples.TupleFactory<Tuples.TupleN>
Modifier and Type | Field and Description |
---|---|
protected TypeSystem.TypeFactory<?>[] |
types |
Modifier | Constructor and Description |
---|---|
protected |
TupleNTypeFactory(Collection<TypeSystem.TypeFactory<?>> typeFactories) |
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.TupleN |
create(Object value)
Create the typed representation of the value given the supplied object representation.
|
Tuples.TupleN |
create(String value)
Create the typed representation of the value given the supplied string representation.
|
Comparator<Tuples.TupleN> |
getComparator()
Get a comparator that can be used to store the values of this type.
|
org.mapdb.Serializer<Tuples.TupleN> |
getSerializer(BufferManager bufferMgr) |
Class<Tuples.TupleN> |
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 final TypeSystem.TypeFactory<?>[] types
protected TupleNTypeFactory(Collection<TypeSystem.TypeFactory<?>> typeFactories)
public org.mapdb.Serializer<Tuples.TupleN> getSerializer(BufferManager bufferMgr)
getSerializer
in interface Tuples.TupleFactory<Tuples.TupleN>
public Class<Tuples.TupleN> getType()
TypeSystem.TypeFactory
getType
in interface TypeSystem.TypeFactory<Tuples.TupleN>
public Comparator<Tuples.TupleN> getComparator()
TypeSystem.TypeFactory
getComparator
in interface TypeSystem.TypeFactory<Tuples.TupleN>
public String getTypeName()
TypeSystem.TypeFactory
getTypeName
in interface TypeSystem.TypeFactory<Tuples.TupleN>
public Tuples.TupleN create(String value) throws ValueFormatException
TypeSystem.TypeFactory
create
in interface TypeSystem.TypeFactory<Tuples.TupleN>
value
- the string representation of the valuetype
ValueFormatException
- if the string cannot be converted to a typed valuepublic Tuples.TupleN create(Object value) throws ValueFormatException
TypeSystem.TypeFactory
create
in interface TypeSystem.TypeFactory<Tuples.TupleN>
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.TupleN>
value
- the valuepublic long length(Object value)
TypeSystem.TypeFactory
length
in interface TypeSystem.TypeFactory<Tuples.TupleN>
value
- the valuepublic String asReadableString(Object value)
TypeSystem.TypeFactory
asReadableString
in interface TypeSystem.TypeFactory<Tuples.TupleN>
value
- the valueCopyright © 2008–2016 JBoss, a division of Red Hat. All rights reserved.