|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.crsh.cli.type.ValueType<V>
V
- the generic value typepublic abstract class ValueType<V>
A type for values.
Field Summary | |
---|---|
static ValueType<Boolean> |
BOOLEAN
. |
protected Class<? extends Completer> |
completer
. |
static ValueType<Enum> |
ENUM
. |
static ValueType<Integer> |
INTEGER
. |
static ValueType<ObjectName> |
OBJECT_NAME
. |
static ValueType<Properties> |
PROPERTIES
. |
static ValueType<String> |
STRING
. |
static ValueType<Thread> |
THREAD
. |
protected Class<V> |
type
. |
Constructor Summary | |
---|---|
protected |
ValueType(Class<V> type)
|
protected |
ValueType(Class<V> type,
Class<? extends Completer> completer)
|
Method Summary | ||
---|---|---|
boolean |
equals(Object obj)
|
|
Class<? extends Completer> |
getCompleter()
|
|
(package private) int |
getDistance(Class<?> clazz)
|
|
Class<V> |
getType()
|
|
int |
hashCode()
|
|
abstract
|
parse(Class<S> type,
String s)
|
|
V |
parse(String s)
|
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final ValueType<String> STRING
public static final ValueType<Integer> INTEGER
public static final ValueType<Boolean> BOOLEAN
public static final ValueType<Enum> ENUM
public static final ValueType<Properties> PROPERTIES
public static final ValueType<ObjectName> OBJECT_NAME
public static final ValueType<Thread> THREAD
protected final Class<V> type
protected final Class<? extends Completer> completer
Constructor Detail |
---|
protected ValueType(Class<V> type, Class<? extends Completer> completer) throws NullPointerException
NullPointerException
protected ValueType(Class<V> type) throws NullPointerException
NullPointerException
Method Detail |
---|
final int getDistance(Class<?> clazz)
public final int hashCode()
hashCode
in class Object
public final boolean equals(Object obj)
equals
in class Object
public Class<? extends Completer> getCompleter()
public final Class<V> getType()
public final V parse(String s) throws Exception
Exception
public abstract <S extends V> S parse(Class<S> type, String s) throws Exception
Exception
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |