T - Type of datasetP - Type of preprocessorpublic abstract class BaseFileIterator<T,P> extends Object implements Iterator<T>
| Modifier and Type | Field and Description |
|---|---|
protected int |
batchSize |
protected List<String> |
list |
protected int[] |
order |
protected int |
position |
protected P |
preProcessor |
protected Random |
rng |
| Modifier | Constructor and Description |
|---|---|
protected |
BaseFileIterator(File[] rootDirs,
boolean recursive,
Random rng,
int batchSize,
String... validExtensions) |
protected |
BaseFileIterator(File rootDir,
int batchSize,
String... validExtensions) |
| Modifier and Type | Method and Description |
|---|---|
protected abstract void |
applyPreprocessor(T toPreProcess) |
boolean |
asyncSupported() |
boolean |
hasNext() |
protected abstract T |
load(File f) |
protected abstract T |
merge(List<T> toMerge) |
protected T |
mergeAndStoreRemainder(List<T> toMerge) |
T |
next() |
void |
remove() |
void |
reset() |
boolean |
resetSupported() |
protected abstract int |
sizeOf(T of) |
protected abstract List<T> |
split(T toSplit) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitforEachRemainingprotected final int batchSize
protected final Random rng
protected int[] order
protected int position
protected P preProcessor
protected BaseFileIterator(@NonNull
File rootDir,
int batchSize,
String... validExtensions)
Copyright © 2018. All rights reserved.