|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.modeshape.graph.property.ValueTypeSystem.Factory<T>
protected class ValueTypeSystem.Factory<T>
| Field Summary | |
|---|---|
protected PropertyType |
type
|
protected String |
typeName
|
protected ValueFactory<T> |
valueFactory
|
| Constructor Summary | |
|---|---|
protected |
ValueTypeSystem.Factory(ValueFactory<T> valueFactory)
|
| Method Summary | |
|---|---|
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. |
T |
create(Object value)
Create the typed representation of the value given the supplied object representation. |
T |
create(String value)
Create the typed representation of the value given the supplied string representation. |
Comparator<T> |
getComparator()
Get a comparator that can be used to store the values of this type. |
Class<T> |
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. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected final PropertyType type
protected final ValueFactory<T> valueFactory
protected final String typeName
| Constructor Detail |
|---|
protected ValueTypeSystem.Factory(ValueFactory<T> valueFactory)
| Method Detail |
|---|
public String asReadableString(Object value)
asReadableString in interface TypeSystem.TypeFactory<T>value - the value
TypeSystem.TypeFactory.asReadableString(java.lang.Object)public String asString(Object value)
asString in interface TypeSystem.TypeFactory<T>value - the value
TypeSystem.TypeFactory.asString(java.lang.Object)
public T create(String value)
throws ValueFormatException
create in interface TypeSystem.TypeFactory<T>value - the string representation of the value
type
ValueFormatException - if the string cannot be converted to a typed valueTypeSystem.TypeFactory.create(java.lang.String)
public T create(Object value)
throws ValueFormatException
create in interface TypeSystem.TypeFactory<T>value - the object representation of the value
type
ValueFormatException - if the object cannot be converted to a typed valueTypeSystem.TypeFactory.create(java.lang.Object)public Class<T> getType()
getType in interface TypeSystem.TypeFactory<T>TypeSystem.TypeFactory.getType()public long length(Object value)
length in interface TypeSystem.TypeFactory<T>value - the value
TypeSystem.TypeFactory.length(java.lang.Object)public Comparator<T> getComparator()
getComparator in interface TypeSystem.TypeFactory<T>TypeSystem.TypeFactory.getComparator()public String getTypeName()
getTypeName in interface TypeSystem.TypeFactory<T>TypeSystem.TypeFactory.getTypeName()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||