Interface SequenceChain<Value_,Difference_ extends Comparable<Difference_>>
- Type Parameters:
Value_- The type of value in the sequence.Difference_- The type of difference between values in the sequence.
- All Known Implementing Classes:
ConsecutiveSetTree
public interface SequenceChain<Value_,Difference_ extends Comparable<Difference_>>
Contains info regarding the consecutive sequences and breaks in a collection of points.
-
Method Summary
Modifier and TypeMethodDescription@NonNull Collection<Break<Value_,Difference_>> @NonNull Collection<Sequence<Value_,Difference_>> @Nullable Break<Value_,Difference_> Returns the first break between two consecutive sequences of values.@Nullable Sequence<Value_,Difference_> Returns the first sequence of consecutive values.@Nullable Break<Value_,Difference_> Returns the last break between two consecutive sequences of values.@Nullable Sequence<Value_,Difference_> Returns the last sequence of consecutive values.
-
Method Details
-
getConsecutiveSequences
@NonNull Collection<Sequence<Value_,Difference_>> getConsecutiveSequences()- Returns:
- the sequences contained in the collection in ascending order.
-
getBreaks
@NonNull Collection<Break<Value_,Difference_>> getBreaks()- Returns:
- the breaks contained in the collection in ascending order.
-
getFirstSequence
@Nullable Sequence<Value_,Difference_> getFirstSequence()Returns the first sequence of consecutive values.- Returns:
- null if there are no sequences
-
getLastSequence
@Nullable Sequence<Value_,Difference_> getLastSequence()Returns the last sequence of consecutive values.- Returns:
- null if there are no sequences
-
getFirstBreak
@Nullable Break<Value_,Difference_> getFirstBreak()Returns the first break between two consecutive sequences of values.- Returns:
- null if there are less than two sequences
-
getLastBreak
@Nullable Break<Value_,Difference_> getLastBreak()Returns the last break between two consecutive sequences of values.- Returns:
- null if there are less than two sequences
-