ExampleTimeline class
A example timeline that can be used for test purposes.
- Inheritance
-
- Object
- GgTimeline<
double> - ExampleTimeline
Constructors
- ExampleTimeline({int numItems = 20})
- Creates an example timeline for test purposes
-
ExampleTimeline.withItems(Iterable<
GgTimelineItem< items)double> > - Create an timeline from a given list of timeline items
Properties
-
currentItem
→ GgTimelineItem<
double> -
Returns the current item
no setterinherited
- hashCode → int
-
The hash code for this object.
no setterinherited
- isInitial → bool
-
Returns true if timeline is an initial timeline
no setterinherited
-
items
→ List<
GgTimelineItem< double> > -
Returns all items
no setterinherited
-
nextItem
→ GgTimelineItem<
double> -
Returns the next item.
Returns the last item when no following item is available
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- seed → double
-
The inital value inserted on the timeline
no setteroverride
Methods
-
addOrReplaceItem(
{required double data, required GgSeconds timePosition}) → void -
Will update the data of an existing item starting on
timePosition. If such an item is not existing, a new item will be inserted into the timeline. The duration of the previous item will change subsequently.inherited -
createItem(
{required double data, required GgSeconds validFrom, required GgSeconds validTo}) → GgTimelineItem< double> -
Creates a new item without inserting it into the timeline.
inherited
-
futureItems(
{required GgSeconds timePosition, required int count, bool where(GgTimelineItem< double> )?}) → Iterable<GgTimelineItem< double> > -
Returns n future items starting after the given time position.
inherited
-
item(
GgSeconds timePosition) → GgTimelineItem< double> -
Returns the item for a given time
inherited
-
jumpToBeginning(
) → void -
Jump to the beginning in the timeline
inherited
-
jumpToOrBefore(
GgSeconds timePosition) → void -
Makes the item exactly starting on
timePositionthe current item. If no item exactly starts ontimePosition, the item before time position will become current item.inherited -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
pastItems(
{required GgSeconds timePosition, required int count, bool where(GgTimelineItem< double> )?}) → Iterable<GgTimelineItem< double> > -
Returns n past items starting at the given time position.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
-
tryToReplaceExistingItem(
{required double data, required GgSeconds timePosition}) → bool -
Use this method to replace an existing on given time position.
Return true, if such an item is available or false if not.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited