Interface OpSource<T>

Type Parameters:
T -
All Superinterfaces:
LongFunction<T>

public interface OpSource<T> extends LongFunction<T>
An OpSource provides an Op for a given long value. OpSources are expected to be deterministic with respect to inputs.
  • Method Summary

    Modifier and Type
    Method
    Description
    default T
    apply(long value)
     
    get(long selector)
    Get the next operation for the given long value.
    static <O extends LongFunction<?>>
    OpSource<O>
    of(OpSequence<OpDispenser<? extends O>> seq)
     
  • Method Details

    • of

      static <O extends LongFunction<?>> OpSource<O> of(OpSequence<OpDispenser<? extends O>> seq)
    • get

      T get(long selector)
      Get the next operation for the given long value. This is simply the offset indicated by the offset sequence array at a modulo position.
      Parameters:
      selector - the long value that determines the next op
      Returns:
      An op of type T
    • apply

      default T apply(long value)
      Specified by:
      apply in interface LongFunction<T>