Class MonthDayGenerator
java.lang.Object
org.instancio.internal.generator.AbstractGenerator<MonthDay>
org.instancio.internal.generator.time.MonthDayGenerator
- All Implemented Interfaces:
AsStringGeneratorSpec<MonthDay>,Generator<MonthDay>,GeneratorSpec<MonthDay>,AsGeneratorSpec<MonthDay>,MonthDayGeneratorSpec,NullableGeneratorSpec<MonthDay>
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionReturns the public API method name of the generator spec.Generate aMonthDayvalue on or before the specified day.Generate aMonthDayvalue on or after the specified day.Generate aMonthDayvalue between the given range.protected MonthDaytryGenerateNonNull(Random random) Makes the best effort to return a non-null value.Methods inherited from class org.instancio.internal.generator.AbstractGenerator
generate, getContext, hints, isNullable, nullable, nullableMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.instancio.generator.specs.AsGeneratorSpec
as, asStringMethods inherited from interface org.instancio.generator.AsStringGeneratorSpec
asString
-
Constructor Details
-
MonthDayGenerator
-
-
Method Details
-
apiMethod
Description copied from class:AbstractGeneratorReturns the public API method name of the generator spec. The returned name is used for reporting validation errors.- Specified by:
apiMethodin classAbstractGenerator<MonthDay>- Returns:
- spec name if defined, or
nullotherwise
-
min
Description copied from interface:MonthDayGeneratorSpecGenerate aMonthDayvalue on or after the specified day.- Specified by:
minin interfaceMonthDayGeneratorSpec- Parameters:
min- lower bound- Returns:
- spec builder
-
max
Description copied from interface:MonthDayGeneratorSpecGenerate aMonthDayvalue on or before the specified day.- Specified by:
maxin interfaceMonthDayGeneratorSpec- Parameters:
max- upper bound- Returns:
- spec builder
-
range
Description copied from interface:MonthDayGeneratorSpecGenerate aMonthDayvalue between the given range.- Specified by:
rangein interfaceMonthDayGeneratorSpec- Parameters:
min- lower bound (inclusive)max- upper bound (inclusive)- Returns:
- spec builder
-
tryGenerateNonNull
Description copied from class:AbstractGeneratorMakes the best effort to return a non-null value. However, in certain cases this method will produce anull.- Specified by:
tryGenerateNonNullin classAbstractGenerator<MonthDay>- Parameters:
random- for generating the value- Returns:
- generated value, either a null or non-null
-