public enum PropertyDispatcher extends Enum<PropertyDispatcher>
Object.toString() and Object.hashCode() methods that are sensitive to
array values which need redirection to different specialized methods defined by Arrays.| Enum Constant and Description |
|---|
BOOLEAN_ARRAY
A property dispatcher for a
boolean[] array. |
BYTE_ARRAY
A property dispatcher for a
byte[] array. |
CHARACTER_ARRAY
A property dispatcher for a
char[] array. |
DOUBLE_ARRAY
A property dispatcher for a
double[] array. |
FLOAT_ARRAY
A property dispatcher for a
float[] array. |
INTEGER_ARRAY
A property dispatcher for a
int[] array. |
LONG_ARRAY
A property dispatcher for a
long[] array. |
NON_ARRAY
A property dispatcher for a non-array.
|
REFERENCE_ARRAY
A property dispatcher for any
Object[] array. |
SHORT_ARRAY
A property dispatcher for a
short[] array. |
| Modifier and Type | Method and Description |
|---|---|
abstract <T> T |
conditionalClone(T value)
Creates a shallow copy of an array but returns non-array types as such.
|
protected abstract boolean |
doEquals(Object first,
Object second)
Compares two values that are both non-null and of the same type as the array.
|
boolean |
equals(Object first,
Object second)
Compares if two values are equal.
|
abstract int |
hashCode(Object value)
Computes a hash code for the given type.
|
static PropertyDispatcher |
of(Class<?> type)
Finds a property dispatcher for a given type.
|
String |
toString() |
abstract String |
toString(Object value)
Computes a string representation for the given type.
|
static PropertyDispatcher |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static PropertyDispatcher[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final PropertyDispatcher BOOLEAN_ARRAY
boolean[] array.public static final PropertyDispatcher BYTE_ARRAY
byte[] array.public static final PropertyDispatcher SHORT_ARRAY
short[] array.public static final PropertyDispatcher CHARACTER_ARRAY
char[] array.public static final PropertyDispatcher INTEGER_ARRAY
int[] array.public static final PropertyDispatcher LONG_ARRAY
long[] array.public static final PropertyDispatcher FLOAT_ARRAY
float[] array.public static final PropertyDispatcher DOUBLE_ARRAY
double[] array.public static final PropertyDispatcher REFERENCE_ARRAY
Object[] array.public static final PropertyDispatcher NON_ARRAY
public static PropertyDispatcher[] values()
for (PropertyDispatcher c : PropertyDispatcher.values()) System.out.println(c);
public static PropertyDispatcher 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 PropertyDispatcher of(Class<?> type)
type - The type for which a property dispatcher should be found.public abstract String toString(Object value)
value - The value onto which a specific toString method should be invoked.public abstract int hashCode(Object value)
value - The value onto which a specific hashCode method should be invoked.public boolean equals(Object first, Object second)
first - The first value which must be of the type of this property dispatcher and not null.second - Another value which might or might not be of the type of this property dispatcher.true if both values are equal.protected abstract boolean doEquals(Object first, Object second)
first - The first value of this property dispatcher's type.second - The second value of this property dispatcher's type.true if both values are equal.public abstract <T> T conditionalClone(T value)
T - The type of the value.value - The value to attempt to clone.public String toString()
toString in class Enum<PropertyDispatcher>Copyright © 2014–2015. All rights reserved.