Class MultiKey
- java.lang.Object
-
- org.apache.tapestry5.commons.util.MultiKey
-
public final class MultiKey extends java.lang.Object
Combines multiple values to form a single composite key. MultiKey can often be used as an alternative to nested maps.
-
-
Constructor Summary
Constructors Constructor Description MultiKey(java.lang.Object... values)Creates a new instance from the provided values.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(java.lang.Object obj)java.lang.Object[]getValues()Returns a copy of the values array.inthashCode()java.lang.StringtoString()
-
-
-
Constructor Detail
-
MultiKey
public MultiKey(java.lang.Object... values)
Creates a new instance from the provided values. It is assumed that the values provided are good map keys themselves -- immutable, with proper implementations of equals() and hashCode().- Parameters:
values-
-
-
Method Detail
-
hashCode
public int hashCode()
- Overrides:
hashCodein classjava.lang.Object
-
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equalsin classjava.lang.Object
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
getValues
public java.lang.Object[] getValues()
Returns a copy of the values array.- Since:
- 5.8.3
-
-