|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectadams.core.ConsoleObject
adams.core.option.AbstractOptionHandler
adams.data.spreadsheet.rowfinder.AbstractRowFinder
public abstract class AbstractRowFinder
Ancestor for classes that find rows of interest in datasets.
| Field Summary |
|---|
| Fields inherited from class adams.core.option.AbstractOptionHandler |
|---|
m_DebugLevel, m_OptionManager |
| Constructor Summary | |
|---|---|
AbstractRowFinder()
|
|
| Method Summary | |
|---|---|
static HashSet<Integer> |
arrayToHashSet(int[] indices)
Turns the array into a hashset. |
protected void |
check(SpreadSheet data)
Checks the data. |
int |
compareTo(Object o)
Compares this object with the specified object for order. |
protected abstract int[] |
doFindRows(SpreadSheet data)
Returns the rows of interest in the spreadsheet. |
boolean |
equals(Object o)
Returns whether the two objects are the same. |
static SpreadSheet |
filter(SpreadSheet input,
RowFinder finder)
Filters the rows of the spreadsheet with the specified row finder. |
int[] |
findRows(SpreadSheet data)
Returns the rows of interest in the spreadsheet. |
static RowFinder |
forCommandLine(String cmdline)
Instantiates the row finder from the given commandline (i.e., classname and optional options). |
static RowFinder |
forName(String classname,
String[] options)
Instantiates the row finder with the given options. |
static String[] |
getRowFinders()
Returns a list with classnames of row finders. |
RowFinder |
shallowCopy()
Returns a shallow copy of itself, i.e., based on the commandline options. |
RowFinder |
shallowCopy(boolean expand)
Returns a shallow copy of itself, i.e., based on the commandline options. |
| Methods inherited from class adams.core.option.AbstractOptionHandler |
|---|
cleanUpOptions, debug, debug, debugLevelTipText, defineOptions, destroy, finishInit, getDebugLevel, getOptionManager, globalInfo, initialize, isDebugOn, newOptionManager, reset, setDebugLevel, toCommandLine, toString |
| Methods inherited from class adams.core.ConsoleObject |
|---|
getDebugging, getSystemErr, getSystemOut, sizeOf |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public AbstractRowFinder()
| Method Detail |
|---|
protected void check(SpreadSheet data)
data - the data to checkprotected abstract int[] doFindRows(SpreadSheet data)
data - the spreadsheet to inspect
public int[] findRows(SpreadSheet data)
findRows in interface RowFinderdata - the spreadsheet to inspect
public int compareTo(Object o)
o - the object to be compared.
ClassCastException - if the specified object's type prevents it
from being compared to this object.public boolean equals(Object o)
equals in class Objecto - the object to be compared
public RowFinder shallowCopy()
shallowCopy in interface ShallowCopySupporter<RowFinder>public RowFinder shallowCopy(boolean expand)
shallowCopy in interface ShallowCopySupporter<RowFinder>expand - whether to expand variables to their current values
public static String[] getRowFinders()
public static RowFinder forName(String classname,
String[] options)
classname - the classname of the row finder to instantiateoptions - the options for the row finder
public static RowFinder forCommandLine(String cmdline)
cmdline - the classname (and optional options) of the
row finder to instantiate
public static HashSet<Integer> arrayToHashSet(int[] indices)
indices - the indices to turn into hashset
public static SpreadSheet filter(SpreadSheet input,
RowFinder finder)
input - the spreadsheet to filterfinder - the row finder to use
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||