Class Int8SequenceSupplier

java.lang.Object
guru.mikelue.foxglove.functional.Int8SequenceSupplier
All Implemented Interfaces:
SequenceSupplier<Long>, StatefulSupplier<Long>, LongSupplier, Supplier<Long>

public class Int8SequenceSupplier extends Object implements LongSupplier, SequenceSupplier<Long>
Provides consequent number with customizable start and steps. The type is Long(8 bytes) based.
See Also:
  • Constructor Details

    • Int8SequenceSupplier

      public Int8SequenceSupplier()
      Constructs the supplier with start value as 1 and step as 1.
      See Also:
    • Int8SequenceSupplier

      public Int8SequenceSupplier(long startValue)
      Constructs the supplier with start value as 0 and step as 1.
      Parameters:
      startValue - The start value
      See Also:
    • Int8SequenceSupplier

      public Int8SequenceSupplier(long startValue, int stepValue)
      Constructs the supplier with customizable start value and step.
      Parameters:
      startValue - The start value
      stepValue - The step value
      See Also:
  • Method Details

    • getAsLong

      public long getAsLong()
      Gets the next value in sequence.
      Specified by:
      getAsLong in interface LongSupplier
      Returns:
      The next value
    • nextValue

      public Long nextValue()
      Gets the next value in sequence.
      Specified by:
      nextValue in interface SequenceSupplier<Long>
      Returns:
      The next value
    • lastValue

      public Long lastValue()
      Gets the next value in sequence(without stepping).
      Specified by:
      lastValue in interface SequenceSupplier<Long>
      Returns:
      The current value