StubPlan

open class StubPlan : Plan

A stub of the Plan interface that throws an exception on all methods. Used for testing by overriding methods with hard-coded outputs. You only need to implement the methods you intend to call.

Constructors

Link copied to clipboard
constructor()

Functions

Link copied to clipboard

Queries activity directives, filtered by type, deserializing them as AnyDirective.

@NotNull
open fun <A> directives(@Nullable type: String, @NotNull deserializer: (in SerializedValue) -> out A): Directives<A>
Query activity directives.
Link copied to clipboard
open fun duration(): Duration

The total duration of the plan, whether simulated on the full extent or not.

Link copied to clipboard
@NotNull
open fun events(@NotNull query: EventQuery): ExternalEvents
Get external events associated with this plan.
Link copied to clipboard
@NotNull
open fun <V, TL : SerialSegmentOps<V, TL>?> resource(@NotNull name: String, @NotNull deserializer: (in List<Segment<SerializedValue>>) -> out TL): TL
Query a resource profile from the external datasets associated with this plan.
Link copied to clipboard
@NotNull
open fun toAbsolute(@NotNull rel: Duration): Instant
Convert a relative duration to a time instant.
Link copied to clipboard
@NotNull
open fun toRelative(@NotNull abs: Instant): Duration
Convert a time instant to a relative duration (relative to plan start).
Link copied to clipboard
@NotNull
open fun totalBounds(): Interval
Total extent of the plan's bounds, whether it was simulated on the full extent or not.