T - - type of value that is produced by the inputpublic abstract class AsyncRangeDefinedSupplierBase<T> extends java.lang.Object implements com.github.akurilov.commons.concurrent.Initializable, RangeDefinedSupplier<T>
| Modifier and Type | Field and Description |
|---|---|
protected com.github.akurilov.commons.math.Random |
rnd |
RANGE_BRACKETS, RANGE_DELIMITER, SEED_BRACKETS| Modifier | Constructor and Description |
|---|---|
protected |
AsyncRangeDefinedSupplierBase(com.github.akurilov.coroutines.CoroutinesProcessor coroutinesProcessor,
long seed,
T minValue,
T maxValue) |
| Modifier and Type | Method and Description |
|---|---|
void |
close() |
protected abstract T |
computeRange(T minValue,
T maxValue) |
java.lang.String |
get() |
int |
get(java.util.List<java.lang.String> buffer,
int limit) |
boolean |
isInitialized() |
protected T |
minValue() |
protected T |
range() |
protected abstract T |
rangeValue() |
void |
reset()
Reset this input making this readable from the beginning
|
protected abstract T |
singleValue() |
long |
skip(long count)
Skip some items.
|
protected abstract java.lang.String |
toString(T value)
An implementation of this method should specify
how to get a String presentation of a clean input-produced value
|
T |
value() |
protected AsyncRangeDefinedSupplierBase(com.github.akurilov.coroutines.CoroutinesProcessor coroutinesProcessor,
long seed,
T minValue,
T maxValue)
throws OmgDoesNotPerformException
OmgDoesNotPerformExceptionprotected abstract T rangeValue()
protected abstract T singleValue()
protected abstract java.lang.String toString(T value)
value - - a clean input-produced valueprotected final T minValue()
protected final T range()
public final T value()
value in interface RangeDefinedSupplier<T>public final java.lang.String get()
get in interface java.util.function.Supplier<java.lang.String>public final int get(java.util.List<java.lang.String> buffer,
int limit)
get in interface BatchSupplier<java.lang.String>public final long skip(long count)
BatchSupplierskip in interface BatchSupplier<java.lang.String>count - count of items should be skipped from the input streampublic final void reset()
BatchSupplierreset in interface BatchSupplier<java.lang.String>public boolean isInitialized()
isInitialized in interface com.github.akurilov.commons.concurrent.Initializablepublic final void close()
throws java.io.IOException
close in interface java.io.Closeableclose in interface java.lang.AutoCloseablejava.io.IOException