public class ExtractionState extends Object
SequenceFile
.
Basically, this class stores the current state of the extraction and
determines whether the next item should be extracted or not.Constructor and Description |
---|
ExtractionState() |
Modifier and Type | Method and Description |
---|---|
protected boolean |
allowNext() |
int |
getCount() |
boolean |
isFinished() |
void |
setMaxFileExtract(int max)
Set the maximum allowed number of records to extract.
|
void |
setRandomSelection(int number,
int total)
Instruct the state to extract number records from the file randomly.
|
protected void |
tick() |
public ExtractionState()
public int getCount()
protected boolean allowNext()
public boolean isFinished()
protected void tick()
public void setRandomSelection(int number, int total)
number
- number of records to extracttotal
- total number of records in the filepublic void setMaxFileExtract(int max)
max
- the number of records.