Class UnixFSDualCounter.Snapshot
java.lang.Object
dev.getelements.elements.rt.transact.unix.UnixFSDualCounter.Snapshot
- Enclosing class:
UnixFSDualCounter
Gets a snapshot of the counter. This includes both the leading and trailing values.
-
Method Summary
Modifier and TypeMethodDescriptionintGets the leading value.intgetMax()Gets the max value.longGets the snapshot value.intGets the trailing value.booleaninRange(int index) Checks if the supplied index is in range.booleanisEmpty()A null snapshot was taken when leading == trailing.range()ReturnsIntStreamrepresenting the range of valid integers covered by this stream.ReturnsIntStreamrepresenting the range of valid integers covered by this stream, in reverse order.toString()
-
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
ReturnsIntStreamrepresenting the range of valid integers covered by this stream.- Returns:
- this range.
-
reverseRange
ReturnsIntStreamrepresenting 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
-