|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | ENUM CONSTANTS | FIELD | METHOD | DETAIL: ENUM CONSTANTS | FIELD | METHOD |
java.lang.Objectjava.lang.Enum<PropertyType>
org.modeshape.graph.property.PropertyType
@Immutable public enum PropertyType
The data types for property values.
Nested Class Summary | |
---|---|
protected static class |
PropertyType.ClassBasedTypeChecker
|
protected static class |
PropertyType.DoubleCanonicalizer
|
protected static class |
PropertyType.LongCanonicalizer
|
protected static class |
PropertyType.ObjectCanonicalizer
|
protected static class |
PropertyType.StrongReferenceTypeChecker
|
protected static class |
PropertyType.WeakReferenceTypeChecker
|
Enum Constant Summary | |
---|---|
BINARY
|
|
BOOLEAN
|
|
DATE
|
|
DECIMAL
|
|
DOUBLE
|
|
LONG
|
|
NAME
|
|
OBJECT
|
|
PATH
|
|
REFERENCE
|
|
STRING
|
|
URI
|
|
UUID
|
|
WEAKREFERENCE
|
Method Summary | |
---|---|
static PropertyType |
discoverType(Class<?> clazz)
Discover the most appropriate PropertyType whose values can be assigned to variables or parameters of the supplied
type. |
static PropertyType |
discoverType(Object value)
|
Object |
getCanonicalValue(Object value)
Obtain a value of this type in its canonical form. |
Comparator<?> |
getComparator()
|
String |
getName()
|
Class<?> |
getValueClass()
|
boolean |
isTypeFor(Object value)
|
boolean |
isTypeForEach(Iterable<?> values)
|
boolean |
isTypeForEach(Iterator<?> values)
|
static Iterator<PropertyType> |
iterator()
Return an iterator over all the property type enumeration literals. |
static PropertyType |
valueFor(String typeNameInAnyCase)
|
static PropertyType |
valueOf(String name)
Returns the enum constant of this type with the specified name. |
static PropertyType[] |
values()
Returns an array containing the constants of this enum type, in the order they are declared. |
Methods inherited from class java.lang.Enum |
---|
clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf |
Methods inherited from class java.lang.Object |
---|
getClass, notify, notifyAll, wait, wait, wait |
Enum Constant Detail |
---|
public static final PropertyType STRING
public static final PropertyType BINARY
public static final PropertyType LONG
public static final PropertyType DOUBLE
public static final PropertyType DECIMAL
public static final PropertyType DATE
public static final PropertyType BOOLEAN
public static final PropertyType NAME
public static final PropertyType PATH
public static final PropertyType UUID
public static final PropertyType REFERENCE
public static final PropertyType WEAKREFERENCE
public static final PropertyType URI
public static final PropertyType OBJECT
Method Detail |
---|
public static PropertyType[] values()
for (PropertyType c : PropertyType.values()) System.out.println(c);
public static PropertyType valueOf(String name)
name
- the name of the enum constant to be returned.
IllegalArgumentException
- if this enum type has no constant
with the specified name
NullPointerException
- if the argument is nullpublic Class<?> getValueClass()
public String getName()
public Comparator<?> getComparator()
public Object getCanonicalValue(Object value)
Note that this method does not cast from one property type to another.
value
- the property value
public final boolean isTypeFor(Object value)
public final boolean isTypeForEach(Iterable<?> values)
public final boolean isTypeForEach(Iterator<?> values)
public static PropertyType discoverType(Object value)
public static PropertyType discoverType(Class<?> clazz)
PropertyType
whose values can be assigned to variables or parameters of the supplied
type. This method does check whether the supplied Class
is an array, in which case it just evalutes the
component type
of the array.
clazz
- the class representing the type of a value or parameter; may not be null
public static Iterator<PropertyType> iterator()
public static PropertyType valueFor(String typeNameInAnyCase)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | ENUM CONSTANTS | FIELD | METHOD | DETAIL: ENUM CONSTANTS | FIELD | METHOD |