Skip to content

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:Boolean
When 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:ZoneId
Zone Id to be used by Clock. Defaults to UTC.

Functions

Name Summary
build fun build():TimeSlip
Construct a TimeSlip instance that will provide Instants based on the configured sequence.
cycle fun cycle(shouldCycle:Boolean):TimeSlip.SequenceBuilder
Specify if the sequence should repeat.
first fun first(vararg instants:Instant):TimeSlip.SequenceBuilder
fun first(instants:Collection<Instant>):TimeSlip.SequenceBuilder
Prepend a number of instants to the start of the sequence of instants.
then fun then(vararg instants:Instant):TimeSlip.SequenceBuilder
fun then(instants:Collection<Instant>):TimeSlip.SequenceBuilder
Apend a number of instants to the end of the sequence of instants.
zone fun zone(zoneId:ZoneId):TimeSlip.SequenceBuilder
Set the zone Id to be used by Clock.