Class UnixFSDualCounter.Snapshot

java.lang.Object
dev.getelements.elements.rt.transact.unix.UnixFSDualCounter.Snapshot
Enclosing class:
UnixFSDualCounter

public static class UnixFSDualCounter.Snapshot extends Object
Gets a snapshot of the counter. This includes both the leading and trailing values.
  • Method Details

    • getSnapshot

      public long getSnapshot()
      Gets the snapshot value.
      Returns:
      the snapshot value
    • getLeading

      public int getLeading()
      Gets the leading value.
      Returns:
      the leading value.
    • getTrailing

      public int getTrailing()
      Gets the trailing value.
      Returns:
      the trailing value
    • isEmpty

      public boolean isEmpty()
      A null snapshot was taken when leading == trailing.
      Returns:
      true if empty
    • getMax

      public int getMax()
      Gets the max value.
      Returns:
      the max value
    • range

      public IntStream range()
      Returns IntStream representing the range of valid integers covered by this stream.
      Returns:
      this range.
    • reverseRange

      public IntStream reverseRange()
      Returns IntStream representing the range of valid integers covered by this stream, in reverse order.
      Returns:
      this range.
    • inRange

      public boolean inRange(int index)
      Checks if the supplied index is in range.
      Parameters:
      index - the index
      Returns:
      true if in range, false otherwise
    • toString

      public String toString()
      Overrides:
      toString in class Object