Enum Class RandomAlgorithm

java.lang.Object
java.lang.Enum<RandomAlgorithm>
io.github.astrapi69.random.enumeration.RandomAlgorithm
All Implemented Interfaces:
Serializable, Comparable<RandomAlgorithm>, Constable

public enum RandomAlgorithm extends Enum<RandomAlgorithm>
The enum RandomAlgorithm holds the algorithm for calculate random values
  • Enum Constant Details

    • MATH_ABS

      public static final RandomAlgorithm MATH_ABS
      The algorithm with Math#abs method
    • MATH_RANDOM

      public static final RandomAlgorithm MATH_RANDOM
      The algorithm with Math#random method
    • RANDOM

      public static final RandomAlgorithm RANDOM
      The algorithm with Random class
    • SECURE_RANDOM

      public static final RandomAlgorithm SECURE_RANDOM
      The algorithm with SecureRandom class
  • Method Details

    • values

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

      public static RandomAlgorithm valueOf(String name)
      Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (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 class has no constant with the specified name
      NullPointerException - if the argument is null