|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.infinispan.commons.equivalence.ByteArrayEquivalence
public class ByteArrayEquivalence
A compare function for unsigned byte arrays.
| Field Summary | |
|---|---|
static Equivalence<byte[]> |
INSTANCE
|
| Constructor Summary | |
|---|---|
ByteArrayEquivalence()
|
|
| Method Summary | |
|---|---|
int |
compare(byte[] obj,
byte[] otherObj)
Compares the two given objects for order. |
boolean |
equals(byte[] obj,
Object otherObj)
Indicates whether the objects passed are "equal to" each other. |
int |
hashCode(Object obj)
Returns a hash code value for the object passed. |
boolean |
isComparable(Object obj)
Returns whether the given object is comparable. |
String |
toString(Object obj)
Returns a string representation of the given object. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final Equivalence<byte[]> INSTANCE
| Constructor Detail |
|---|
public ByteArrayEquivalence()
| Method Detail |
|---|
public int hashCode(Object obj)
EquivalenceObject.hashCode(), call java.util.Arrays.hashCode().
hashCode in interface Equivalence<byte[]>obj - instance to calculate hash code for
public boolean equals(byte[] obj,
Object otherObj)
EquivalenceObject.equals(Object)}, call java.util.Arrays.equals()).
equals in interface Equivalence<byte[]>obj - to be compared with second parameterotherObj - to be compared with first parameter
true if both objects are the same;
false otherwisepublic String toString(Object obj)
Equivalence
toString in interface Equivalence<byte[]>obj - whose string representation is to be returned
public boolean isComparable(Object obj)
EquivalenceEquivalence.compare(Object, Object) method.
isComparable in interface Equivalence<byte[]>obj - instance to check if it's comparable
true if the object is comparable;
false otherwise
public int compare(byte[] obj,
byte[] otherObj)
Equivalence
compare in interface Equivalence<byte[]>obj - first object to be comparedotherObj - second object to be compared
|
--> | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||