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 |
|---|---|
LegsSequence<L> |
copy()
Returns a copy of the sequence.
|
default LegsSequence<L> |
copy(AbsoluteDateInterval newInterval)
Creates a new legs sequence from this one.
|
LegsSequence<L> |
copy(AbsoluteDateInterval newInterval,
boolean strict)
Creates a new legs sequence from this one.
|
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.
|
default LegsSequence<L> |
head(AbsoluteDate toT)
Returns a new sequence from the beginning to the given element.
|
LegsSequence<L> |
head(AbsoluteDate toT,
boolean strict)
Returns a new sequence from the beginning to the given element.
|
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.
|
default LegsSequence<L> |
sub(AbsoluteDate fromT,
AbsoluteDate toT)
Returns a new sequence extracted.
|
LegsSequence<L> |
sub(AbsoluteDate fromT,
AbsoluteDate toT,
boolean strict)
Returns a new sequence extracted.
|
default LegsSequence<L> |
sub(AbsoluteDateInterval interval)
Returns a new sequence extracted.
|
LegsSequence<L> |
sub(AbsoluteDateInterval interval,
boolean strict)
Returns a new sequence extracted.
|
LegsSequence<L> |
sub(L fromLeg,
L toLeg)
Returns a new sequence extracted.
|
default LegsSequence<L> |
tail(AbsoluteDate fromT)
Returns a new sequence from the given element to the end of the sequence.
|
LegsSequence<L> |
tail(AbsoluteDate fromT,
boolean strict)
Returns a new sequence from the given element to the end of the sequence.
|
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).LegsSequence<L> sub(AbsoluteDate fromT, AbsoluteDate toT, boolean strict)
fromT - Any element of this sequence.toT - Any element of this sequence.strict - true if boundaries shall not be included in the extracted sequence, false otherwise.Sequence object including all elements from the given one fromT
to the given one.
Elements exactly on the interval boundaries are included only if strict =
false.default LegsSequence<L> sub(AbsoluteDate fromT, AbsoluteDate toT)
fromT - Any element of this sequence.toT - Any element of this sequence.Sequence object including all elements from the given one fromT
to the given one toT (both included).LegsSequence<L> sub(AbsoluteDateInterval interval, boolean strict)
interval - interval.strict - true if boundaries shall not be included in the extracted sequence, false otherwise.Sequence object including all elements included in the interval
.
Elements exactly on the interval boundaries are included only if strict =
false.default LegsSequence<L> sub(AbsoluteDateInterval interval)
interval - interval.Sequence object including all elements included in the interval
.
Elements exactly on the interval boundaries are included.LegsSequence<L> head(AbsoluteDate toT, boolean strict)
toT - Any element of this sequence.strict - true if boundary shall not be included in the extracted sequence, false otherwise.Sequence object including all elements from the “beginning” to the
given one (included only
if strict = false).default LegsSequence<L> head(AbsoluteDate toT)
toT - Any element of this sequence.Sequence object including all elements from the “beginning” to the
given one (included).LegsSequence<L> tail(AbsoluteDate fromT, boolean strict)
fromT - Any element of this sequence.strict - true if boundary shall not be included in the extracted sequence, false otherwise.Sequence object including all elements from the given one (included
only
if strict = false) to the “end” of the sequence.default LegsSequence<L> tail(AbsoluteDate fromT)
fromT - Any element of this sequence.Sequence object including all elements from the given one (included) to
the “end” of the
sequence.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()
LegsSequence<L> copy()
copy in interface TimeSequence<L extends Leg>LegsSequence<L> copy(AbsoluteDateInterval newInterval, boolean strict)
newInterval - The time interval of the legs sequence to createstrict - true if boundaries shall not be included in the new sequence, false otherwise.LegsSequence valid on provided intervalIllegalArgumentException - If the given newInterval is problematic (too long, too short, whatever)default LegsSequence<L> copy(AbsoluteDateInterval newInterval)
newInterval - The time interval of the legs sequence to createLegsSequence valid on provided interval. Boundaries are not included in
the new sequence.IllegalArgumentException - If the given newInterval is problematic (too long, too short, whatever)Copyright © 2024 CNES. All rights reserved.