public final class AnyEquivalence<T> extends java.lang.Object implements Equivalence<T>
| Modifier and Type | Field and Description |
|---|---|
static AnyEquivalence<java.lang.Boolean> |
BOOLEAN
Deprecated.
|
static AnyEquivalence<java.lang.Byte> |
BYTE
Deprecated.
|
static AnyEquivalence<java.lang.Double> |
DOUBLE
Deprecated.
|
static AnyEquivalence<java.lang.Float> |
FLOAT
Deprecated.
|
static AnyEquivalence<java.lang.Integer> |
INT
Deprecated.
|
static AnyEquivalence<java.lang.Long> |
LONG
Deprecated.
|
static AnyEquivalence<java.lang.Short> |
SHORT
Deprecated.
|
static AnyEquivalence<java.lang.String> |
STRING
Deprecated.
|
| Modifier and Type | Method and Description |
|---|---|
int |
compare(T obj,
T otherObj)
Deprecated.
Compares the two given objects for order.
|
boolean |
equals(T obj,
java.lang.Object otherObj)
Deprecated.
Indicates whether the objects passed are "equal to" each other.
|
static <T> AnyEquivalence<T> |
getInstance()
Deprecated.
|
static <T> AnyEquivalence<T> |
getInstance(java.lang.Class<T> classType)
Deprecated.
|
int |
hashCode(java.lang.Object obj)
Deprecated.
Returns a hash code value for the object passed.
|
boolean |
isComparable(java.lang.Object obj)
Deprecated.
Returns whether the given object is comparable.
|
java.lang.String |
toString(java.lang.Object obj)
Deprecated.
Returns a string representation of the given object.
|
public static AnyEquivalence<java.lang.String> STRING
public static AnyEquivalence<java.lang.Byte> BYTE
public static AnyEquivalence<java.lang.Short> SHORT
public static AnyEquivalence<java.lang.Integer> INT
public static AnyEquivalence<java.lang.Long> LONG
public static AnyEquivalence<java.lang.Double> DOUBLE
public static AnyEquivalence<java.lang.Float> FLOAT
public static AnyEquivalence<java.lang.Boolean> BOOLEAN
public int hashCode(java.lang.Object obj)
EquivalenceObject.hashCode(), call Object.hashCode().hashCode in interface Equivalence<T>obj - instance to calculate hash code forpublic boolean equals(T obj, java.lang.Object otherObj)
EquivalenceObject.equals(Object)}, call Arrays.equals(Object[], Object[]).equals in interface Equivalence<T>obj - to be compared with second parameterotherObj - to be compared with first parametertrue if both objects are the same;
false otherwisepublic java.lang.String toString(java.lang.Object obj)
EquivalencetoString in interface Equivalence<T>obj - whose string representation is to be returnedpublic boolean isComparable(java.lang.Object obj)
EquivalenceEquivalence.compare(Object, Object) method.isComparable in interface Equivalence<T>obj - instance to check if it's comparabletrue if the object is comparable;
false otherwisepublic int compare(T obj, T otherObj)
Equivalencecompare in interface Equivalence<T>obj - first object to be comparedotherObj - second object to be comparedpublic static <T> AnyEquivalence<T> getInstance()
public static <T> AnyEquivalence<T> getInstance(java.lang.Class<T> classType)