Package org.compiere.util
Class KeyNamePair
java.lang.Object
org.compiere.util.NamePair
org.compiere.util.KeyNamePair
- All Implemented Interfaces:
Serializable
,Comparable<Object>
,Comparator<Object>
Key Name Pair (Integer key and string name)
- Version:
- $Id: KeyNamePair.java,v 1.2 2006/07/30 00:52:23 jjanke Exp $
- Author:
- Jorg Janke
- See Also:
-
Field Summary
-
Constructor Summary
-
Method Summary
Methods inherited from class org.compiere.util.NamePair
compare, compare, compareTo, compareTo, getName, toString, toStringX
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface java.util.Comparator
reversed, thenComparing, thenComparing, thenComparing, thenComparingDouble, thenComparingInt, thenComparingLong
-
Field Details
-
EMPTY
-
-
Constructor Details
-
KeyNamePair
Constructor KeyNamePair Pair -- Parameters:
key
- Key (-1 is considered as null)name
- string representation
-
-
Method Details
-
getKey
public int getKey()Get Key- Returns:
- key
-
getID
Get ID (convert key to string) -
equals
Equals- Specified by:
equals
in interfaceComparator<Object>
- Overrides:
equals
in classObject
- Parameters:
obj
- object- Returns:
- true if equal
-
hashCode
public int hashCode()Return key as hash code of object
-