Enum AndroidFriendlyRandomHolder

java.lang.Object
java.lang.Enum<AndroidFriendlyRandomHolder>
io.opentelemetry.sdk.internal.AndroidFriendlyRandomHolder
All Implemented Interfaces:
Serializable, Comparable<AndroidFriendlyRandomHolder>, java.lang.constant.Constable, Supplier<Random>

enum AndroidFriendlyRandomHolder extends Enum<AndroidFriendlyRandomHolder> implements Supplier<Random>
RandomSupplier instance that doesn't use ThreadLocalRandom, which is broken on most versions of Android (it uses the same seed everytime it starts up).
  • Enum Constant Details

  • Field Details

    • random

      private static final Random random
  • Constructor Details

    • AndroidFriendlyRandomHolder

      private AndroidFriendlyRandomHolder()
  • Method Details

    • values

      public static AndroidFriendlyRandomHolder[] 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 AndroidFriendlyRandomHolder 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
    • get

      public Random get()
      Specified by:
      get in interface Supplier<Random>