|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object | +--com.fdsapi.arrays.ArrayHeaderLocator
This class is used internal to the ArrayFilter, and ArrayComparator classes to allow them to locate array entries by a column lable as opposed to an index. The contsructor takes an array of header names, and one method converts the name to an index based on the position the name has in the array. Another method allows you to associate a column name with an index position even if you don't want/need to provide the whole header array. Note column names are case insensitive (i.e. fname is the same as FName)
| Field Summary | |
int |
NOT_IN_HEADER
|
| Constructor Summary | |
ArrayHeaderLocator()
|
|
ArrayHeaderLocator(boolean throwExceptions)
|
|
ArrayHeaderLocator(java.lang.String[] header)
|
|
ArrayHeaderLocator(java.lang.String[] header,
boolean throwExceptions)
|
|
| Method Summary | |
java.lang.Object |
clone()
Clone this factory |
boolean |
containsColName(java.lang.String colName)
Returns true if the this column name is valid |
boolean |
containsColNum(int index)
Returns true if the this column number is valid |
ArrayHeaderLocator |
copy()
Clones the object and then casts it to the appropriate type |
java.lang.String |
getColName(int index)
Return the column name associated with the passed in index (i.e. |
int |
getColNum(java.lang.String columnName)
Returns the column number when passed a column name that matches the header array passed into the Constructor |
boolean |
getThrowExceptions()
|
static void |
main(java.lang.String[] args)
|
void |
setColName(java.lang.String columnName,
int index)
Allows you to explicitly associate a named label with a column index for the array (starting at 0). |
void |
setThrowExceptions(boolean throwExceptions)
|
java.lang.String |
toString()
|
| Methods inherited from class java.lang.Object |
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
public final int NOT_IN_HEADER
| Constructor Detail |
public ArrayHeaderLocator()
public ArrayHeaderLocator(boolean throwExceptions)
public ArrayHeaderLocator(java.lang.String[] header)
public ArrayHeaderLocator(java.lang.String[] header,
boolean throwExceptions)
| Method Detail |
public int getColNum(java.lang.String columnName)
public void setThrowExceptions(boolean throwExceptions)
public boolean getThrowExceptions()
public java.lang.String getColName(int index)
public boolean containsColNum(int index)
public boolean containsColName(java.lang.String colName)
public void setColName(java.lang.String columnName,
int index)
public java.lang.Object clone()
clone in class java.lang.Objectpublic ArrayHeaderLocator copy()
public java.lang.String toString()
toString in class java.lang.Objectpublic static void main(java.lang.String[] args)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||