@FunctionalInterface public interface ClockSeqFunction extends java.util.function.LongUnaryOperator
It receives as argument a number of 100-nanoseconds since 1970-01-01 (Unix epoch).
Example:
// A function that returns new random clock sequences
ClockSeqFunction f = t -> ClockSeqFunction.getRandom();
| 限定符和类型 | 接口和说明 |
|---|---|
static class |
ClockSeqFunction.ClockSeqPool
Nested class that manages a pool of 16384 clock sequence values.
|
| 限定符和类型 | 方法和说明 |
|---|---|
static long |
getRandom()
Returns a new random clock sequence in the range 0 to 16383 (2^14-1).
|
static long |
toExpectedRange(long clockseq)
Clears the leading bits so that the resulting number is within the range 0 to
16383 (2^14-1).
|
andThen, applyAsLong, compose, identitystatic long getRandom()
static long toExpectedRange(long clockseq)
The result is equivalent to n % 2^14.
clockseq - a clock sequenceCopyright © 2024. All rights reserved.