org.staxnav
Class ValueType<V>
java.lang.Object
org.staxnav.ValueType<V>
- Direct Known Subclasses:
- ValueType.EnumType
public abstract class ValueType<V>
- extends java.lang.Object
The type of a value.
- Version:
- $Revision$
- Author:
- Julien Viet
|
Method Summary |
static
|
get(java.lang.Class<E> enumClass)
Returns a value type for an enum class. |
protected abstract V |
parse(java.lang.String s)
Parse the string to the java type for a non null parameter value. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
STRING
public static final ValueType<java.lang.String> STRING
TRIMMED_STRING
public static final ValueType<java.lang.String> TRIMMED_STRING
BOOLEAN
public static final ValueType<java.lang.Boolean> BOOLEAN
INTEGER
public static final ValueType<java.lang.Integer> INTEGER
DATE
public static final ValueType<java.util.Date> DATE
DATE_TIME
public static final ValueType<java.util.Date> DATE_TIME
ValueType
protected ValueType()
get
public static <E extends java.lang.Enum<E>> ValueType<E> get(java.lang.Class<E> enumClass)
- Returns a value type for an enum class.
- Type Parameters:
E - the enum parameter type- Parameters:
enumClass - the enum class
- Returns:
- the corresponding value type
parse
protected abstract V parse(java.lang.String s)
throws java.lang.Exception
- Parse the string to the java type for a non null parameter value.
- Parameters:
s - the string value to parse
- Returns:
- the parsed value
- Throws:
java.lang.Exception - any exception that would prevent the type conversion to happen
Copyright © 2011 eXo Platform SAS. All Rights Reserved.