Module com.github.f4b6a3.uuid
Class TimeOrderedEpochFactory.Builder
- java.lang.Object
-
- com.github.f4b6a3.uuid.factory.AbstRandomBasedFactory.Builder<T,B>
-
- com.github.f4b6a3.uuid.factory.AbstCombFactory.Builder<TimeOrderedEpochFactory,TimeOrderedEpochFactory.Builder>
-
- com.github.f4b6a3.uuid.factory.standard.TimeOrderedEpochFactory.Builder
-
- Enclosing class:
- TimeOrderedEpochFactory
public static class TimeOrderedEpochFactory.Builder extends AbstCombFactory.Builder<TimeOrderedEpochFactory,TimeOrderedEpochFactory.Builder>
Concrete builder for creating a Unix epoch time-ordered factory.- See Also:
AbstCombFactory.Builder
-
-
Field Summary
-
Fields inherited from class com.github.f4b6a3.uuid.factory.AbstCombFactory.Builder
instantFunction
-
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 TimeOrderedEpochFactorybuild()Finishes the factory building.protected longgetIncrementMax()Get the max increment.protected intgetIncrementType()Set the increment type.TimeOrderedEpochFactory.BuilderwithIncrementPlus1()Set the increment type to PLUS 1.TimeOrderedEpochFactory.BuilderwithIncrementPlusN()Set the increment type to PLUS N.TimeOrderedEpochFactory.BuilderwithIncrementPlusN(long incrementMax)Set the increment type to PLUS N and set the max increment.-
Methods inherited from class com.github.f4b6a3.uuid.factory.AbstCombFactory.Builder
getInstantFunction, withClock, withInstantFunction, withTimeFunction
-
Methods inherited from class com.github.f4b6a3.uuid.factory.AbstRandomBasedFactory.Builder
getRandom, withFastRandom, withRandom, withRandomFunction, withSafeRandom
-
-
-
-
Method Detail
-
withIncrementPlus1
public TimeOrderedEpochFactory.Builder withIncrementPlus1()
Set the increment type to PLUS 1.- Returns:
- the builder
-
withIncrementPlusN
public TimeOrderedEpochFactory.Builder withIncrementPlusN()
Set the increment type to PLUS N.- Returns:
- the builder
-
withIncrementPlusN
public TimeOrderedEpochFactory.Builder withIncrementPlusN(long incrementMax)
Set the increment type to PLUS N and set the max increment.- Parameters:
incrementMax- a number- Returns:
- the builder
-
getIncrementType
protected int getIncrementType()
Set the increment type.- Returns:
- an number
-
getIncrementMax
protected long getIncrementMax()
Get the max increment.- Returns:
- a number
-
build
public TimeOrderedEpochFactory build()
Description copied from class:AbstRandomBasedFactory.BuilderFinishes the factory building.- Specified by:
buildin classAbstRandomBasedFactory.Builder<TimeOrderedEpochFactory,TimeOrderedEpochFactory.Builder>- Returns:
- the build factory
-
-