Interface OneOfArrayGeneratorSpec<T>

Type Parameters:
T - type of value
All Superinterfaces:
GeneratorSpec<T>, NullableGeneratorSpec<T>
All Known Subinterfaces:
OneOfArraySpec<T>

public interface OneOfArrayGeneratorSpec<T> extends NullableGeneratorSpec<T>
Generator spec for selecting a random value from an array.
Since:
1.0.1
  • Method Summary

    Modifier and Type
    Method
    Description
    oneOf(T... values)
    Selects a random value from the given choices.

    Methods inherited from interface org.instancio.generator.specs.NullableGeneratorSpec

    nullable
  • Method Details

    • oneOf

      GeneratorSpec<T> oneOf(T... values)
      Selects a random value from the given choices.
      Parameters:
      values - from which a random value will be selected
      Returns:
      spec builder
      Since:
      1.0.1