public static enum JsonSchema.Type extends Enum<JsonSchema.Type>
Enum Constant and Description |
---|
ANY |
ARRAY |
BOOLEAN |
INTEGER |
NULL |
NUMBER |
OBJECT |
STRING |
UNION |
UNKNOWN |
Modifier and Type | Method and Description |
---|---|
static JsonSchema.Type |
byName(String name)
Find the type enumeration literal given the (case-insensitive) name.
|
Object |
convertValueFrom(Object actualValue,
JsonSchema.Type actualType)
Attempt to convert the supplied value (with the given type) into a value compatible with this type.
|
boolean |
isEquivalent(JsonSchema.Type other)
Determine whether this type is equivalent to the supplied type.
|
String |
toString() |
static JsonSchema.Type |
typeFor(Object value)
Determine the type for the given value.
|
static EnumSet<JsonSchema.Type> |
typesWithNames(Object typeName)
Obtain the set of types given the supplied name or iterable container of names.
|
static JsonSchema.Type |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static JsonSchema.Type[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final JsonSchema.Type STRING
public static final JsonSchema.Type NUMBER
public static final JsonSchema.Type INTEGER
public static final JsonSchema.Type BOOLEAN
public static final JsonSchema.Type OBJECT
public static final JsonSchema.Type ARRAY
public static final JsonSchema.Type NULL
public static final JsonSchema.Type ANY
public static final JsonSchema.Type UNION
public static final JsonSchema.Type UNKNOWN
public static JsonSchema.Type[] values()
for (JsonSchema.Type c : JsonSchema.Type.values()) System.out.println(c);
public static JsonSchema.Type valueOf(String name)
name
- the name of the enum constant to be returned.IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is nullpublic String toString()
toString
in class Enum<JsonSchema.Type>
public static JsonSchema.Type byName(String name)
name
- the case-independent name of the typepublic boolean isEquivalent(JsonSchema.Type other)
other
- the type to be compared with this typepublic Object convertValueFrom(Object actualValue, JsonSchema.Type actualType)
actualValue
- the value to be converted; may be nullactualType
- the type of the value; may be nullpublic static JsonSchema.Type typeFor(Object value)
value
- the field valuepublic static EnumSet<JsonSchema.Type> typesWithNames(Object typeName)
typeName
- the String or Symbol representation of a single type name, or an Iterable&?> list of namesCopyright © 2008–2016 JBoss, a division of Red Hat. All rights reserved.