|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.tapestry.util.MultiKey
public class MultiKey
A complex key that may be used as an alternative to nested
Map
s.
Constructor Summary | |
---|---|
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(Object[] keys,
boolean makeCopy)
Builds a MultiKey from an array of keys. |
Method Summary | |
---|---|
boolean |
equals(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(ObjectInput in)
Reads the state previously written by writeExternal(ObjectOutput) . |
String |
toString()
Identifies all the keys stored by this MultiKey . |
void |
writeExternal(ObjectOutput out)
Writes a count of the keys, then writes each individual key. |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public MultiKey()
Externalizable
; this leaves the new MultiKey in a
non-usable state and shouldn't be used by user code.
public MultiKey(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
.
IllegalArgumentException
- if keys is null, of if the
first element of keys is null.Method Detail |
---|
public boolean equals(Object other)
MultiKey
equals
in class Object
public int hashCode()
Map
keys.
hashCode
in class Object
public String toString()
MultiKey
.
toString
in class Object
public void writeExternal(ObjectOutput out) throws IOException
writeExternal
in interface Externalizable
IOException
public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException
writeExternal(ObjectOutput)
.
readExternal
in interface Externalizable
IOException
ClassNotFoundException
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |