Enum StringType

java.lang.Object
java.lang.Enum<StringType>
org.instancio.settings.StringType
All Implemented Interfaces:
Serializable, Comparable<StringType>, java.lang.constant.Constable

@ExperimentalApi public enum StringType extends Enum<StringType>
A setting that specifies the type of String to generate. String type can be set using the Keys.STRING_TYPE setting:

 Person person = Instancio.of(Person.class)
     .withSetting(Keys.STRING_TYPE, StringType.ALPHANUMERIC) // all strings alphanumeric
     .create();
 
Since:
4.7.0
See Also:
  • Enum Constant Details

  • Method Details

    • values

      public static StringType[] values()
      Returns an array containing the constants of this enum type, in the order they are declared.
      Returns:
      an array containing the constants of this enum type, in the order they are declared
    • valueOf

      public static StringType valueOf(String name)
      Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum type has no constant with the specified name
      NullPointerException - if the argument is null