Class AtomicIntegerGenerator
java.lang.Object
org.instancio.internal.generator.AbstractGenerator<T>
org.instancio.internal.generator.lang.AbstractRandomNumberGeneratorSpec<AtomicInteger>
org.instancio.internal.generator.util.concurrent.atomic.AtomicIntegerGenerator
- All Implemented Interfaces:
AsStringGeneratorSpec<AtomicInteger>
,Generator<AtomicInteger>
,GeneratorSpec<AtomicInteger>
,AsGeneratorSpec<AtomicInteger>
,NullableGeneratorSpec<AtomicInteger>
,NumberAsGeneratorSpec<AtomicInteger>
,NumberGeneratorSpec<AtomicInteger>
public class AtomicIntegerGenerator
extends AbstractRandomNumberGeneratorSpec<AtomicInteger>
implements NumberGeneratorSpec<AtomicInteger>
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionReturns the public API method name of the generator spec.protected AtomicInteger
tryGenerateNonNull
(Random random) Makes the best effort to return a non-null value.Methods inherited from class org.instancio.internal.generator.lang.AbstractRandomNumberGeneratorSpec
generate, getMax, getMin, max, min, nullable, nullable, range
Methods inherited from class org.instancio.internal.generator.AbstractGenerator
getContext, hints, isNullable
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.instancio.generator.specs.AsGeneratorSpec
as, asString
Methods inherited from interface org.instancio.generator.AsStringGeneratorSpec
asString
-
Constructor Details
-
AtomicIntegerGenerator
-
-
Method Details
-
apiMethod
Description copied from class:AbstractGenerator
Returns the public API method name of the generator spec. The returned name is used for reporting validation errors.- Specified by:
apiMethod
in classAbstractGenerator<AtomicInteger>
- Returns:
- spec name if defined, or
null
otherwise
-
tryGenerateNonNull
Description copied from class:AbstractGenerator
Makes the best effort to return a non-null value. However, in certain cases this method will produce anull
.- Specified by:
tryGenerateNonNull
in classAbstractGenerator<AtomicInteger>
- Parameters:
random
- for generating the value- Returns:
- generated value, either a null or non-null
-