|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | ENUM CONSTANTS | FIELD | METHOD | DETAIL: ENUM CONSTANTS | FIELD | METHOD |
java.lang.Object java.lang.Enum<ODValueType> org.jopendocument.dom.ODValueType
public enum ODValueType
A type of value, as per 16.1 "Data Types" and 6.7.1 "Variable Value Types and Values"
Enum Constant Summary | |
---|---|
BOOLEAN
|
|
CURRENCY
|
|
DATE
|
|
FLOAT
Parses to BigDecimal to return the exact number. |
|
PERCENTAGE
|
|
STRING
|
|
TIME
|
Method Summary | |
---|---|
boolean |
canFormat(Class<?> toFormat)
|
abstract String |
format(Object o)
|
static ODValueType |
forObject(Object o)
Try to guess the value type for the passed object. |
static ODValueType |
get(String name)
The instance for the passed value type. |
String |
getName()
The value for the value-type attribute. |
String |
getValueAttribute()
The name of the value attribute for this value type. |
abstract Object |
parse(String s)
|
static ODValueType |
valueOf(String name)
Returns the enum constant of this type with the specified name. |
static ODValueType[] |
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 ODValueType FLOAT
BigDecimal
to return the exact number.
public static final ODValueType PERCENTAGE
public static final ODValueType CURRENCY
public static final ODValueType DATE
public static final ODValueType TIME
public static final ODValueType BOOLEAN
public static final ODValueType STRING
Method Detail |
---|
public static ODValueType[] values()
for (ODValueType c : ODValueType.values()) System.out.println(c);
public static ODValueType 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 final String getValueAttribute()
public boolean canFormat(Class<?> toFormat)
public abstract String format(Object o)
public abstract Object parse(String s)
public final String getName()
public static ODValueType get(String name)
name
- the value of the value-type attribute, e.g. "date".
null
, e.g. DATE
.
IllegalArgumentException
- if name
isn't a valid type.public static ODValueType forObject(Object o) throws NullPointerException
o
- the object.
o
or null
.
NullPointerException
- if o
is null
.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | ENUM CONSTANTS | FIELD | METHOD | DETAIL: ENUM CONSTANTS | FIELD | METHOD |