|
Compiere 3.1 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.compiere.util.NamePair
public abstract class NamePair
Name Pair Interface
| Constructor Summary | |
|---|---|
|
NamePair()
|
protected |
NamePair(String name)
Protected Constructor |
| Method Summary | |
|---|---|
int |
compare(NamePair p1,
NamePair p2)
Comparator Interface (based on Name/ID value) |
int |
compareTo(NamePair o)
Comparable Interface (based on Name/ID value) |
abstract String |
getID()
Returns Key or Value as String |
String |
getName()
Returns display value |
static int |
indexOfKey(ArrayList<NamePair> options,
String key)
Returns the index of the first option found for the key, or -1 if not found. |
static int |
indexOfValue(ArrayList<NamePair> options,
String value)
Returns the index of the first option found for the key, or -1 if not found. |
boolean |
isSortByName()
Get Sort By Name |
void |
setName(String name)
Set Name |
void |
setSortByName(boolean sortByName)
Set Sort By Name |
String |
toString()
To String - returns name |
String |
toStringX()
To String - detail |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface java.util.Comparator |
|---|
equals |
| Constructor Detail |
|---|
public NamePair()
protected NamePair(String name)
name - (Display) Name of the Pair| Method Detail |
|---|
public String getName()
public void setName(String name)
name - namepublic boolean isSortByName()
public void setSortByName(boolean sortByName)
sortByName - true if by name, false by IDpublic abstract String getID()
public int compare(NamePair p1,
NamePair p2)
compare in interface Comparator<NamePair>p1 - Value 1p2 - Value 2
public int compareTo(NamePair o)
compareTo in interface Comparable<NamePair>o - the Object to be compared.
public String toString()
toString in class Objectpublic String toStringX()
public static int indexOfKey(ArrayList<NamePair> options,
String key)
key -
public static int indexOfValue(ArrayList<NamePair> options,
String value)
value -
|
Compiere 3.1 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||