Module com.github.f4b6a3.uuid
Package com.github.f4b6a3.uuid.factory
Class AbstCombFactory.Builder<T,B extends AbstCombFactory.Builder<T,B>>
- java.lang.Object
-
- com.github.f4b6a3.uuid.factory.AbstRandomBasedFactory.Builder<T,B>
-
- com.github.f4b6a3.uuid.factory.AbstCombFactory.Builder<T,B>
-
- Type Parameters:
T- factory typeB- builder type
- Direct Known Subclasses:
PrefixCombFactory.Builder,ShortPrefixCombFactory.Builder,ShortSuffixCombFactory.Builder,SuffixCombFactory.Builder,TimeOrderedEpochFactory.Builder
- Enclosing class:
- AbstCombFactory
public abstract static class AbstCombFactory.Builder<T,B extends AbstCombFactory.Builder<T,B>> extends AbstRandomBasedFactory.Builder<T,B>
Abstract builder for creating a COMB factory.- See Also:
AbstRandomBasedFactory.Builder
-
-
Field Summary
Fields Modifier and Type Field Description protected Supplier<Instant>instantFunctionThe instant function.-
Fields inherited from class com.github.f4b6a3.uuid.factory.AbstRandomBasedFactory.Builder
random
-
-
Constructor Summary
Constructors Constructor Description Builder()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected Supplier<Instant>getInstantFunction()Get the instant function.BwithClock(Clock clock)Set the clock.BwithInstantFunction(Supplier<Instant> instantFunction)Set the instant function.BwithTimeFunction(LongSupplier timeFunction)Set the time function.-
Methods inherited from class com.github.f4b6a3.uuid.factory.AbstRandomBasedFactory.Builder
build, getRandom, withFastRandom, withRandom, withRandomFunction, withSafeRandom
-
-
-
-
Method Detail
-
getInstantFunction
protected Supplier<Instant> getInstantFunction()
Get the instant function.- Returns:
- the builder
-
withClock
public B withClock(Clock clock)
Set the clock.- Parameters:
clock- a clock- Returns:
- the builder
-
withTimeFunction
public B withTimeFunction(LongSupplier timeFunction)
Set the time function. The time is the number of milliseconds since 1970-01-01T00:00:00Z.- Parameters:
timeFunction- a function- Returns:
- the builder
-
-