public final class HashableMultiKey extends java.lang.Object implements java.io.Serializable, MultiKey
Object.hashCode()
and Arrays.equals(Object[], Object[])
Modifier and Type | Field and Description |
---|---|
static EPTypeClass |
EPTYPE
Type information
|
Constructor and Description |
---|
HashableMultiKey(java.lang.Object key)
Constructor for a single key object.
|
HashableMultiKey(java.lang.Object[] keys)
Constructor for multiple keys supplied in an object array.
|
HashableMultiKey(java.lang.Object key1,
java.lang.Object key2)
Constructor for a pair of key objects.
|
HashableMultiKey(java.lang.Object key1,
java.lang.Object key2,
java.lang.Object key3)
Constructor for three key objects.
|
HashableMultiKey(java.lang.Object key1,
java.lang.Object key2,
java.lang.Object key3,
java.lang.Object key4)
Constructor for four key objects.
|
Modifier and Type | Method and Description |
---|---|
boolean |
equals(java.lang.Object other) |
java.lang.Object |
get(int index)
Returns the key object at the specified position.
|
java.lang.Object |
getKey(int num)
Returns the key value at the given index
|
java.lang.Object[] |
getKeys()
Returns keys.
|
int |
getNumKeys()
Returns the number of keys available
|
int |
hashCode() |
int |
size()
Returns the number of key objects.
|
java.lang.String |
toString() |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
toObjectArray
public static final EPTypeClass EPTYPE
public HashableMultiKey(java.lang.Object[] keys)
keys
- is an array of key objectspublic HashableMultiKey(java.lang.Object key)
key
- is the single key objectpublic HashableMultiKey(java.lang.Object key1, java.lang.Object key2)
key1
- is the first key objectkey2
- is the second key objectpublic HashableMultiKey(java.lang.Object key1, java.lang.Object key2, java.lang.Object key3)
key1
- is the first key objectkey2
- is the second key objectkey3
- is the third key objectpublic HashableMultiKey(java.lang.Object key1, java.lang.Object key2, java.lang.Object key3, java.lang.Object key4)
key1
- is the first key objectkey2
- is the second key objectkey3
- is the third key objectkey4
- is the fourth key objectpublic final int size()
public final java.lang.Object get(int index)
index
- is the array positionpublic final boolean equals(java.lang.Object other)
equals
in class java.lang.Object
public int getNumKeys()
MultiKey
getNumKeys
in interface MultiKey
public java.lang.Object getKey(int num)
MultiKey
public java.lang.Object[] getKeys()
public final int hashCode()
hashCode
in class java.lang.Object
public final java.lang.String toString()
toString
in class java.lang.Object