public class MultiKey extends java.lang.Object implements java.io.Externalizable
Maps.| Constructor and Description |
|---|
MultiKey()
Public no-arguments constructor needed to be compatible with
Externalizable; this leaves the new MultiKey in a
non-usable state and shouldn't be used by user code. |
MultiKey(java.lang.Object[] keys,
boolean makeCopy)
Builds a
MultiKey from an array of keys. |
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(java.lang.Object other)
Returns true if:
The other object is a
MultiKey
They have the same number of key elements
Every element is an exact match or is equal
|
int |
hashCode()
Returns the hash code of the receiver, which is computed from all the
non-null key elements.
|
void |
readExternal(java.io.ObjectInput in)
Reads the state previously written by
writeExternal(ObjectOutput). |
java.lang.String |
toString()
Identifies all the keys stored by this
MultiKey. |
void |
writeExternal(java.io.ObjectOutput out)
Writes a count of the keys, then writes each individual key.
|
public MultiKey()
Externalizable; this leaves the new MultiKey in a
non-usable state and shouldn't be used by user code.public MultiKey(java.lang.Object[] keys, boolean makeCopy)
MultiKey from an array of keys. If the array is not
copied, then it must not be modified.keys - The components of the key.makeCopy - If true, a copy of the keys is created. If false,
the keys are simple retained by the MultiKey.java.lang.IllegalArgumentException - if keys is null, of if the
first element of keys is null.public boolean equals(java.lang.Object other)
MultiKey
equals in class java.lang.Objectpublic int hashCode()
Map keys.hashCode in class java.lang.Objectpublic java.lang.String toString()
MultiKey.toString in class java.lang.Objectpublic void writeExternal(java.io.ObjectOutput out) throws java.io.IOException
writeExternal in interface java.io.Externalizablejava.io.IOExceptionpublic void readExternal(java.io.ObjectInput in) throws java.io.IOException, java.lang.ClassNotFoundException
writeExternal(ObjectOutput).readExternal in interface java.io.Externalizablejava.io.IOExceptionjava.lang.ClassNotFoundException