Enum Constant and Description |
---|
INTEGER
Integer type for Ids
|
LONG
Long type for Ids
|
STRING
String type for Ids
|
Modifier and Type | Method and Description |
---|---|
java.lang.Class<?> |
getTypeClass()
Returns the Java type class that is associated with this IdType.
|
static IdType |
getTypeFor(java.lang.Class<?> typeClass)
Returns the IdType based on a typeClass.
|
java.lang.Object |
parse(java.lang.String input)
Parses the given string into an object of this type.
|
static IdType |
parseIdType(java.lang.String input)
Parse IdType from a string value.
|
java.lang.String |
toKey()
Returns the key of this type as string.
|
java.lang.String |
toString()
Returns the key of this type as string.
|
static IdType |
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name.
|
static IdType[] |
values()
Returns an array containing the constants of this enum type, in the order they are declared.
|
public static final IdType INTEGER
public static final IdType LONG
public static final IdType STRING
public java.lang.Class<?> getTypeClass()
getTypeClass
in interface Type
public static IdType getTypeFor(java.lang.Class<?> typeClass)
typeClass
- Use this typeClass to derive the IdTypepublic java.lang.Object parse(java.lang.String input)
input
- the string to parsepublic static IdType parseIdType(java.lang.String input)
input
- Value to use to parse an IdType from. You can use the output of toString()
as input.public java.lang.String toKey()
Type
public java.lang.String toString()
toKey()
.toString
in class java.lang.Enum<IdType>
public static IdType valueOf(java.lang.String name)
name
- the name of the enum constant to be returned.java.lang.IllegalArgumentException
- if this enum type has no constant with the specified namejava.lang.NullPointerException
- if the argument is nullpublic static IdType[] values()
for (IdType c : IdType.values()) System.out.println(c);
Copyright © 2016, 2017 Oracle Corp. All Rights Reserved.