public static enum DynamicType.Builder.FieldValueTarget.NumericRangeValidator extends Enum<DynamicType.Builder.FieldValueTarget.NumericRangeValidator>
Enum Constant and Description |
---|
BOOLEAN
A validator for
boolean values. |
BYTE
A validator for
byte values. |
CHARACTER
A validator for
char values. |
INTEGER
A validator for
int values. |
LONG
A validator for
long values. |
SHORT
A validator for
short values. |
Modifier and Type | Method and Description |
---|---|
static DynamicType.Builder.FieldValueTarget.NumericRangeValidator |
of(TypeDescription typeDescription)
Identifies the correct validator for a given type description.
|
String |
toString() |
Object |
validate(int value)
Validates and wraps a given
int value for the represented numeric range. |
static DynamicType.Builder.FieldValueTarget.NumericRangeValidator |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static DynamicType.Builder.FieldValueTarget.NumericRangeValidator[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final DynamicType.Builder.FieldValueTarget.NumericRangeValidator BOOLEAN
boolean
values.public static final DynamicType.Builder.FieldValueTarget.NumericRangeValidator BYTE
byte
values.public static final DynamicType.Builder.FieldValueTarget.NumericRangeValidator SHORT
short
values.public static final DynamicType.Builder.FieldValueTarget.NumericRangeValidator CHARACTER
char
values.public static final DynamicType.Builder.FieldValueTarget.NumericRangeValidator INTEGER
int
values.public static final DynamicType.Builder.FieldValueTarget.NumericRangeValidator LONG
long
values.public static DynamicType.Builder.FieldValueTarget.NumericRangeValidator[] values()
for (DynamicType.Builder.FieldValueTarget.NumericRangeValidator c : DynamicType.Builder.FieldValueTarget.NumericRangeValidator.values()) System.out.println(c);
public static DynamicType.Builder.FieldValueTarget.NumericRangeValidator 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 static DynamicType.Builder.FieldValueTarget.NumericRangeValidator of(TypeDescription typeDescription)
typeDescription
- The type of a field for which a default value should be validated.public Object validate(int value)
int
value for the represented numeric range.value
- The value to be validated for a given numeric range.public String toString()
toString
in class Enum<DynamicType.Builder.FieldValueTarget.NumericRangeValidator>
Copyright © 2014–2015. All rights reserved.