Class LongSignalSourceChooser.OfEnumInt<E extends Enum<E>>

Type Parameters:
E - the enum type to select by
All Implemented Interfaces:
AbstractSignalSource, LongSignalSource, LongSupplier
Enclosing class:
LongSignalSourceChooser

static class LongSignalSourceChooser.OfEnumInt<E extends Enum<E>> extends LongSignalSourceChooser.OfInt
Chooses from an array of signal sources, dynamically by the ordinal value of an enum.

Class and constructor are not public.

See Also:
  • Constructor Details

    • OfEnumInt

      OfEnumInt(EnumSignalSource<E> selector, LongSignalSource... cases)
      Creates a new instance.
      Parameters:
      selector - the input source that selects from the array by providing the ordinal value of an enum value
      cases - the array of alternative signal sources
      Throws:
      NullPointerException - if selector, cases or any element of cases is null
      IllegalArgumentException - if the number of cases does not match the number of enum values