GenOrThrow
- Type parameters:
- T
the type of value produced by the generator
- Value parameters:
- gen
a generator of some kind
- Deprecated
Value members
Concrete methods
Same as GenFromConfig.iterator except throws an EmptyGenSampleException instead of GenExceededRetryLimit
Same as GenFromConfig.iterator except throws an EmptyGenSampleException instead of GenExceededRetryLimit
- Throws:
- EmptyGenSampleException
when samples cannot be generated after the given number of attempts
Deprecated methods
Same as GenFromConfig.getOrThrow except throws an EmptyGenSampleException
Same as GenFromConfig.getOrThrow except throws an EmptyGenSampleException
- Deprecated
Get the next element from this generator using the default seed with the given number of retries.
Get the next element from this generator using the default seed with the given number of retries.
- Throws:
- EmptyGenSampleException
when samples cannot be generated after the given number of attempts
- Deprecated
Same as GenFromConfig.getOrThrow except throws a EmptyGenSampleException instead of GenExceededRetryLimit
Same as GenFromConfig.getOrThrow except throws a EmptyGenSampleException instead of GenExceededRetryLimit
- Throws:
- EmptyGenSampleException
when samples cannot be generated after a default number of attempts
- Deprecated
Converts this generator into a lazy Iterable so that it can be converted into a collection.
Converts this generator into a lazy Iterable so that it can be converted into a collection.
- Value parameters:
- attempts
the number of attempts to try generating a sample before throwing an execption
- Returns:
A lazy iterable that pulls from this generator or throws an exception
- Throws:
- EmptyGenSampleException
when a sample cannot be generated after the given number of attempts
- Deprecated
Converts this generator into an infinite Iterator for a more flexible pull-based API.
Converts this generator into an infinite Iterator for a more flexible pull-based API.
- Value parameters:
- attempts
the number of attempts to try generating a sample before throwing an execption
- Returns:
An iterator that pulls from this generator or throws an exception
- Throws:
- EmptyGenSampleException
when samples cannot be generated after the given number of attempts
- Deprecated
Get the next element from this generator using the given seed and default size and number of retries.
Get the next element from this generator using the given seed and default size and number of retries.
- Deprecated
Try to get a non-empty sample for a given number of tries and return the resulting get attempts in a Try.
Try to get a non-empty sample for a given number of tries and return the resulting get attempts in a Try.
- Value parameters:
- attempts
the number of attempts to get a non-empty sample before returning a Failure.
- Returns:
Either a non-empty sample or a Failure with information about what sample was tried.
- Deprecated