java.lang.Object | +--org.apache.commons.collections.keyvalue.MultiKeyAll Implemented Interfaces:
MultiKey(Object key1, Object key2) Constructor taking two keys. |
MultiKey(Object key1, Object key2, Object key3) Constructor taking three keys. |
MultiKey(Object key1, Object key2, Object key3, Object key4) Constructor taking four keys. |
MultiKey(Object key1, Object key2, Object key3, Object key4, Object key5) Constructor taking five keys. |
MultiKey(Object[] keys) Constructor taking an array of keys. |
MultiKey(Object[] keys, boolean makeCopy) Constructor taking an array of keys. |
boolean | equals(Object other) Compares this object to another. |
Object[] | getKeys() Gets a copy of the individual keys. |
int | hashCode() Gets the combined hash code that is computed from all the keys. |
String | toString() Gets a debugging string version of the key. |
public MultiKey(Object key1, Object key2, Object key3, Object key4, Object key5)
public MultiKey(Object key1, Object key2, Object key3, Object key4)
public MultiKey(Object key1, Object key2, Object key3)
public MultiKey(Object key1, Object key2)
protected MultiKey(Object[] keys, boolean makeCopy)
- if the key array is nullpublic MultiKey(Object[] keys)
- if the key array is nullpublic boolean equals(Object other)
MultiKey
with the
same number of keys which are also equal.
public Object[] getKeys()
public int hashCode()
public String toString()
MultiKey
allows multiple map keys to be merged together. The purpose of this class is to avoid the need to write code to handle maps of maps. An example might be the need to lookup a filename by key and locale. The typical solution might be nested maps. This class can be used instead by creating an instance passing in the key and locale.