L - Any Leg class.public interface LegsSequence<L extends Leg> extends TimeSequence<L>
Collection of Leg objects.
Previously, this LegsSequence has been a NavigableSet, but too much methods were unsuitable for
Legs objects.
Leg,
TimeSequence,
TimeStamped| Modifier and Type | Method and Description |
|---|---|
L |
current(TimeStamped t)
Returns the current leg at the given date.
|
L |
first()
Returns the first element currently in this sequence.
|
L |
first(TimeStamped t)
Returns the first element after the given date.
|
AbsoluteDateInterval |
getTimeInterval()
Returns the time interval of the legs sequence.
|
LegsSequence<L> |
head(L toLeg)
Returns a new sequence from the beginning to the given element.
|
boolean |
isEmpty(AbsoluteDate date,
AbsoluteDate end)
Checks whether the sequence is free on the given interval or not.
|
L |
last()
Returns the last element currently in this sequence.
|
L |
last(TimeStamped t)
Returns the last element before the given date.
|
L |
next(L leg)
Returns the strictly next element.
|
L |
previous(L leg)
Returns the strictly previous element.
|
Set<L> |
simultaneous(L leg)
Returns leg(s) at the same date.
|
LegsSequence<L> |
sub(L fromLeg,
L toLeg)
Returns a new sequence extracted.
|
LegsSequence<L> |
tail(L fromLeg)
Returns a new sequence from the given element through the end.
|
default String |
toPrettyString() |
contains, containsAll, simultaneousL current(TimeStamped t)
t - A date from any TimeStamped object.Leg at the t date, or null if none.L first()
TimeSequencefirst in interface TimeSequence<L extends Leg>Leg, null if none.L last()
TimeSequencelast in interface TimeSequence<L extends Leg>Leg, null if none.L first(TimeStamped t)
TimeSequence
See TimeSequence.next(TimeStamped) for “strict” comparison.
first in interface TimeSequence<L extends Leg>t - A date from any TimeStamped object.Leg starting after (or at) the given date t.L last(TimeStamped t)
TimeSequence
See TimeSequence.previous(TimeStamped) for “strict” comparison.
last in interface TimeSequence<L extends Leg>t - A date from any TimeStamped object.Leg finishing before (or at) the given date t.Set<L> simultaneous(L leg)
leg - A Leg of this sequence.Set of legs starting at the same date than the given leg. At least, that Set
contains the given leg.IllegalArgumentException - If leg is not in the sequence.L previous(L leg)
TimeSequenceprevious in interface TimeSequence<L extends Leg>leg - Any element of this sequence.Leg of the given leg, null if none.L next(L leg)
TimeSequencenext in interface TimeSequence<L extends Leg>leg - Any element of this sequence.Leg of the given leg, null if none.LegsSequence<L> head(L toLeg)
head in interface TimeSequence<L extends Leg>toLeg - Any element of this sequence.Sequence object including all elements from the “beginning” to the given one (included).LegsSequence<L> tail(L fromLeg)
tail in interface TimeSequence<L extends Leg>fromLeg - Any element of this sequence.Sequence object including all elements from the given one (included) through the “end”.LegsSequence<L> sub(L fromLeg, L toLeg)
sub in interface TimeSequence<L extends Leg>fromLeg - Any element of this sequence.toLeg - Any element of this sequence.Sequence object including all elements from the given one fromT to the given one
toT (both
included).boolean isEmpty(AbsoluteDate date, AbsoluteDate end)
date - The “beginning” date.end - The “end” date.true if this sequence is completely free during the given time interval.default String toPrettyString()
toPrettyString in interface TimeSequence<L extends Leg>String representation.AbsoluteDateInterval getTimeInterval()
Copyright © 2021 CNES. All rights reserved.