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 TypeMethodDescriptionint
Gets the leading value.int
getMax()
Gets the max value.long
Gets the snapshot value.int
Gets the trailing value.boolean
inRange
(int index) Checks if the supplied index is in range.boolean
isEmpty()
A null snapshot was taken when leading == trailing.range()
ReturnsIntStream
representing the range of valid integers covered by this stream.ReturnsIntStream
representing 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
ReturnsIntStream
representing the range of valid integers covered by this stream.- Returns:
- this range.
-
reverseRange
ReturnsIntStream
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
-