protected static class ValueTypeSystem.NodeKeyTypeFactory extends Object implements TypeSystem.TypeFactory<NodeKey>
Modifier | Constructor and Description |
---|---|
protected |
NodeKeyTypeFactory(ValueFactory<String> stringFactory) |
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.
|
NodeKey |
create(Object value)
Create the typed representation of the value given the supplied object representation.
|
NodeKey |
create(String value)
Create the typed representation of the value given the supplied string representation.
|
Comparator<NodeKey> |
getComparator()
Get a comparator that can be used to store the values of this type.
|
Class<NodeKey> |
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 NodeKeyTypeFactory(ValueFactory<String> stringFactory)
public Class<NodeKey> getType()
TypeSystem.TypeFactory
getType
in interface TypeSystem.TypeFactory<NodeKey>
public String getTypeName()
TypeSystem.TypeFactory
getTypeName
in interface TypeSystem.TypeFactory<NodeKey>
public String asString(Object value)
TypeSystem.TypeFactory
asString
in interface TypeSystem.TypeFactory<NodeKey>
value
- the valuepublic String asReadableString(Object value)
TypeSystem.TypeFactory
asReadableString
in interface TypeSystem.TypeFactory<NodeKey>
value
- the valuepublic long length(Object value)
TypeSystem.TypeFactory
length
in interface TypeSystem.TypeFactory<NodeKey>
value
- the valuepublic NodeKey create(Object value) throws ValueFormatException
TypeSystem.TypeFactory
create
in interface TypeSystem.TypeFactory<NodeKey>
value
- the object representation of the valuetype
ValueFormatException
- if the object cannot be converted to a typed valuepublic NodeKey create(String value) throws ValueFormatException
TypeSystem.TypeFactory
create
in interface TypeSystem.TypeFactory<NodeKey>
value
- the string representation of the valuetype
ValueFormatException
- if the string cannot be converted to a typed valuepublic Comparator<NodeKey> getComparator()
TypeSystem.TypeFactory
getComparator
in interface TypeSystem.TypeFactory<NodeKey>
Copyright © 2008–2016 JBoss, a division of Red Hat. All rights reserved.