|
ModeShape Distribution 3.0.0.Beta4 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.modeshape.jcr.value.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)
TypeSystem.TypeFactory
asReadableString
in interface TypeSystem.TypeFactory<T>
value
- the value
public String asString(Object value)
TypeSystem.TypeFactory
asString
in interface TypeSystem.TypeFactory<T>
value
- the value
public T create(String value) throws ValueFormatException
TypeSystem.TypeFactory
create
in interface TypeSystem.TypeFactory<T>
value
- the string representation of the value
type
ValueFormatException
- if the string cannot be converted to a typed valuepublic T create(Object value) throws ValueFormatException
TypeSystem.TypeFactory
create
in interface TypeSystem.TypeFactory<T>
value
- the object representation of the value
type
ValueFormatException
- if the object cannot be converted to a typed valuepublic Class<T> getType()
TypeSystem.TypeFactory
getType
in interface TypeSystem.TypeFactory<T>
public long length(Object value)
TypeSystem.TypeFactory
length
in interface TypeSystem.TypeFactory<T>
value
- the value
public Comparator<T> getComparator()
TypeSystem.TypeFactory
getComparator
in interface TypeSystem.TypeFactory<T>
public String getTypeName()
TypeSystem.TypeFactory
getTypeName
in interface TypeSystem.TypeFactory<T>
|
ModeShape Distribution 3.0.0.Beta4 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |