com.hypercubetools.timeslip / TimeSlip / SequenceBuilder
SequenceBuilder¶
class SequenceBuilder
Builder for a TimeSlip instance backed by a sequence of Instants.
Constructors¶
| Name | Summary |
|---|---|
| <init> | SequenceBuilder()Builder for a TimeSlip instance backed by a sequence of Instants. |
Properties¶
| Name | Summary |
|---|---|
| cycle | var cycle:BooleanWhen true, after returning the last Instant in the sequence, the next sequence will repeat again from the first Instant. When false, after returning the last Instant in the sequence, IllegalStateException will be thrown the next time the time is requested. |
| zone | var zone:ZoneIdZone Id to be used by Clock. Defaults to UTC. |
Functions¶
| Name | Summary |
|---|---|
| build | fun build():TimeSlipConstruct a TimeSlip instance that will provide Instants based on the configured sequence. |
| cycle | fun cycle(shouldCycle:Boolean):TimeSlip.SequenceBuilderSpecify if the sequence should repeat. |
| first | fun first(vararg instants:Instant):TimeSlip.SequenceBuilderfun first(instants:Collection<Instant>):TimeSlip.SequenceBuilderPrepend a number of instants to the start of the sequence of instants. |
| then | fun then(vararg instants:Instant):TimeSlip.SequenceBuilderfun then(instants:Collection<Instant>):TimeSlip.SequenceBuilderApend a number of instants to the end of the sequence of instants. |
| zone | fun zone(zoneId:ZoneId):TimeSlip.SequenceBuilderSet the zone Id to be used by Clock. |