Package io.hypersistence.tsid
Class TSID.Factory.ByteRandom
- java.lang.Object
-
- io.hypersistence.tsid.TSID.Factory.ByteRandom
-
- All Implemented Interfaces:
TSID.Factory.IRandom
- Enclosing class:
- TSID.Factory
static class TSID.Factory.ByteRandom extends java.lang.Object implements TSID.Factory.IRandom
-
-
Field Summary
Fields Modifier and Type Field Description private java.util.function.IntFunction<byte[]>randomFunction
-
Constructor Summary
Constructors Constructor Description ByteRandom()ByteRandom(java.util.function.IntFunction<byte[]> randomFunction)ByteRandom(java.util.Random random)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description protected static java.util.function.IntFunction<byte[]>newRandomFunction(java.util.Random random)byte[]nextBytes(int length)intnextInt()
-
-
-
Method Detail
-
nextInt
public int nextInt()
- Specified by:
nextIntin interfaceTSID.Factory.IRandom
-
nextBytes
public byte[] nextBytes(int length)
- Specified by:
nextBytesin interfaceTSID.Factory.IRandom
-
newRandomFunction
protected static java.util.function.IntFunction<byte[]> newRandomFunction(java.util.Random random)
-
-