public class BinFileMultColRam extends java.lang.Object implements BinFileMultCol
Constructor and Description |
---|
BinFileMultColRam(java.lang.String fileName,
int columns)
Sole constructor.
|
Modifier and Type | Method and Description |
---|---|
static boolean |
existsFileDump(java.lang.String fileName)
Tests, whether the required files for this class, given with the fileName
exist and are not of null-length (like after a failed start of FilePreparer
|
java.util.List |
getData(java.lang.Integer wordNr)
For a given number returns the row
|
java.util.List |
getData(java.lang.Integer number,
int maxItems)
Returns the data for the given number up to the given maximum.
|
java.util.List |
getData(java.lang.Integer number,
int myColumns,
int maxItems)
Returns the data for the given number up to the given maximum.
|
java.util.List |
getData(java.lang.Integer number,
int maxItems,
int[] minCols,
int[] maxCols)
Returns the data for the given number up to the given maximum in a list.
|
java.util.List |
getData(java.lang.Integer number,
int myColumns,
int maxItems,
int[] minCols,
int[] maxCols)
Returns the data for the given number up to the given maximum.
|
java.util.Map |
getDataAsMap(java.lang.Integer wordNr)
Returns the data for the given number up to the given maximum in a map.
|
java.util.Map |
getDataAsMap(java.lang.Integer number,
int maxItems)
Returns the data for the given number up to the given maximum in a map.
|
java.util.Map |
getDataAsMap(java.lang.Integer number,
int myColumns,
int maxItems)
Returns the data for the given number up to the given maximum.
|
java.util.Map |
getDataAsMap(java.lang.Integer number,
int maxItems,
int[] minCols,
int[] maxCols)
Returns the data for the given number up to the given maximum in a map.
|
java.util.Map |
getDataAsMap(java.lang.Integer number,
int myColumns,
int maxItems,
int[] minCols,
int[] maxCols)
Returns the data for the given number up to the given maximum in a map.
|
java.util.List |
getSingleColumn(java.lang.Integer number,
int col)
Column here is the column in the initial datafile, count begins with 1.
|
java.util.List |
getSingleColumn(java.lang.Integer number,
int maxItems,
int col) |
static void |
main(java.lang.String[] args)
With this main method it's possible to test a prepared file.
|
public BinFileMultColRam(java.lang.String fileName, int columns)
fileName
- columns
- How many columns the original file had (must match exactly!)public static boolean existsFileDump(java.lang.String fileName)
fileName
- relative or absolute filename without index or data extensionspublic java.util.List getData(java.lang.Integer wordNr)
getData
in interface BinFileMultCol
wordNr
- Integerpublic java.util.List getData(java.lang.Integer number, int maxItems)
getData
in interface BinFileMultCol
wordNr
- maxItems
- public java.util.List getData(java.lang.Integer number, int myColumns, int maxItems)
getData
in interface BinFileMultCol
number
- = the first columnmyColumns
- = how many columns to returnmaxItems
- = at max this count of itemspublic java.util.List getData(java.lang.Integer number, int myColumns, int maxItems, int[] minCols, int[] maxCols)
getData
in interface BinFileMultCol
number
- = the first columnmyColumns
- = how many columns to returnmaxItems
- = at max this count of itemsminCols
- = for each column each value minimum is specified heremaxCols
- = for each column each value maximum is specified herepublic java.util.List getData(java.lang.Integer number, int maxItems, int[] minCols, int[] maxCols)
getData
in interface BinFileMultCol
wordNr
- The number of the item of which to return the columnsmaxItems
- How many items to return at maxminCols
- for each column the minimum allowed value (the whoe row will
otherwise be omitted)maxCols
- for each column the maximum allowed value (the whoe row will
otherwise be omitted)public java.util.Map getDataAsMap(java.lang.Integer wordNr)
getDataAsMap
in interface BinFileMultCol
wordNr
- The number of the item of which to return the columnspublic java.util.Map getDataAsMap(java.lang.Integer number, int myColumns, int maxItems)
getDataAsMap
in interface BinFileMultCol
wordNr
- The number of the item of which to return the columnsmyColumns
- How many columns to returnmaxItems
- How many items to return at maxpublic java.util.Map getDataAsMap(java.lang.Integer number, int maxItems)
getDataAsMap
in interface BinFileMultCol
wordNr
- The number of the item of which to return the columnsmaxItems
- How many items to return at maxpublic java.util.Map getDataAsMap(java.lang.Integer number, int myColumns, int maxItems, int[] minCols, int[] maxCols)
getDataAsMap
in interface BinFileMultCol
wordNr
- The number of the item of which to return the columnsmyColumns
- How many columns to returnmaxItems
- How many items to return at maxminCols
- for each column the minimum allowed value (the whoe row will
otherwise be omitted)maxCols
- for each column the maximum allowed value (the whoe row will
otherwise be omitted)public java.util.Map getDataAsMap(java.lang.Integer number, int maxItems, int[] minCols, int[] maxCols)
getDataAsMap
in interface BinFileMultCol
wordNr
- The number of the item of which to return the columnsmyColumns
- How many columns to returnmaxItems
- How many items to return at max
otherwise be omitted)maxCols
- for each column the maximum allowed value (the whoe row will
otherwise be omitted)public java.util.List getSingleColumn(java.lang.Integer number, int col)
getSingleColumn
in interface BinFileMultCol
number
- col
- public java.util.List getSingleColumn(java.lang.Integer number, int maxItems, int col)
getSingleColumn
in interface BinFileMultCol
public static void main(java.lang.String[] args)
args
- String[]