Interface Sequence<Value_,Difference_ extends Comparable<Difference_>>
-
- Type Parameters:
Value_- The type of value in the sequenceDifference_- The type of difference between values in the sequence
public interface Sequence<Value_,Difference_ extends Comparable<Difference_>>A Sequence is a series of consecutive values. For instance, the list [1,2,4,5,6,10] has three sequences: [1,2], [4,5,6], and [10].
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description intgetCount()Value_getFirstItem()Iterable<Value_>getItems()Value_getLastItem()Difference_getLength()
-
-
-
Method Detail
-
getFirstItem
Value_ getFirstItem()
- Returns:
- never null, the first item in the sequence
-
getLastItem
Value_ getLastItem()
- Returns:
- never null, the last item in the sequence
-
getItems
Iterable<Value_> getItems()
- Returns:
- never null, an iterable that can iterate through this sequence
-
getCount
int getCount()
- Returns:
- the number of items in this sequence
-
getLength
Difference_ getLength()
- Returns:
- never null, the difference between the last item and first item in this sequence
-
-