|
QJCC homepage | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object biz.chitec.quarterback.util.NumberedString
Data type class combining a number, a String and an additional number if needed.
Field Summary | |
int |
addnr
|
java.lang.String |
name
|
int |
nr
|
Constructor Summary | |
NumberedString(int n,
java.lang.String s)
Constructs new NumberedString with number and string. |
|
NumberedString(int n,
java.lang.String s,
int a)
Constructs new NumberedString with number, string and additional number. |
Method Summary | |
int |
compareTo(java.lang.Object o)
Compares this to another NumberedString, always based on name field. |
int |
compareTo(java.lang.Object o,
boolean byname)
Compares this to another NumberedString. |
boolean |
equals(java.lang.Object o)
Checks equality with another object. |
int |
getAddnr()
Returns additional number. |
java.lang.String |
getName()
Returns String. |
int |
getNr()
Returns number. |
static NumberedString |
getNSfromListbyNSIdx(java.util.List v,
int nsidx)
Returns a NumberedString out of a List of NumberedString by number. |
static boolean |
listContainsNS(java.util.List v,
int nsidx)
Checks whether a List of NumberedStrings contains a certain NumberedString which is given by number. |
void |
setName(java.lang.String x)
Sets the name |
java.lang.String |
toString()
Creates debug output. |
static boolean |
vectorContainsNS(java.util.List v,
int nsidx)
Deprecated. Use listContainsNS |
Methods inherited from class java.lang.Object |
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
public int nr
public java.lang.String name
public int addnr
Constructor Detail |
public NumberedString(int n, java.lang.String s, int a)
public NumberedString(int n, java.lang.String s)
Method Detail |
public int getNr()
public void setName(java.lang.String x)
public java.lang.String getName()
public int getAddnr()
public boolean equals(java.lang.Object o)
public int compareTo(java.lang.Object o, boolean byname)
This method is specially useful when it comes to sorting NumberedStrings for representation in a list or something like that.
public int compareTo(java.lang.Object o)
public java.lang.String toString()
public static NumberedString getNSfromListbyNSIdx(java.util.List v, int nsidx)
public static boolean vectorContainsNS(java.util.List v, int nsidx)
public static boolean listContainsNS(java.util.List v, int nsidx)
v
- List containing objects, hopefully some NumberedStrings among themnsidx
- number of String to search for
|
QJCC homepage | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |