public interface IterableRange<E extends Comparable<E>,S,U,ME extends IterableRange<E,S,U,ME>> extends Iterable<E>, Range<E,ME>
Modifier and Type | Method and Description |
---|---|
E |
getFromLeft(int iStepIndex) |
E |
getFromRight(int iStepIndex) |
S |
getStep() |
U |
getUnit() |
Iterator<E> |
iterateFromLeft() |
Iterator<E> |
iterateFromRight() |
Iterator<E> |
iterator() |
ME |
step(S s) |
ME |
unit(U u) |
count, count, distinctBy, distinctList, filterIndexedTo, filterIndexedToList, filterNotTo, filterNotToList, filterTo, filterToList, first, first, firstOrNull, firstOrNull, flatMap, flatMapTo, fold, forEach, forEachIndexed, indexOfFirst, indexOfLast, intersect, joinTo, joinToString, last, last, lastOrNull, lastOrNull, mapIndexed, mapIndexedNotNull, mapIndexedNotNullTo, mapIndexedNotNullToList, mapIndexedTo, mapIndexedToList, mapNotNull, mapNotNullTo, mapNotNullToList, mapTo, mapToList, maxWith, minWith, partition, reversed, single, single, singleOrNull, singleOrNull, spliterator, subList, subList, subtract, toList, toSet, union
contains, contains, getLeftEndpoint, getRightEndpoint, isLeftClosed, isReversed, isRightClosed
Iterator<E> iterator()
iterator
in interface Iterable<E extends Comparable<E>>
iterateFromLeft()
,
iterateFromRight()
Iterator<E> iterateFromLeft()
iterator()
,
iterateFromRight()
Iterator<E> iterateFromRight()
iterator()
,
iterateFromLeft()
S getStep()
For instance, if the range is a set of decimal values, say [1..10], the step might be a decimal increment, say 0.25. Similarly, if the range is simply a set of integers the step might also be an integer value, typically 1. Considering a date range, say [4/5/10..5/20/10], the step could be expressed in terms of a unit of time e.g., 10 seconds, 1 minute, 2 weeks, etc.
Note if non-null, the step is a positive (or absolute) increment. To iterate the range in reverse order use iterateFromRight().
U getUnit()
E getFromLeft(int iStepIndex)
iStepIndex
- The index of the step from the left endpointE getFromRight(int iStepIndex)
iStepIndex
- The index of the step from the right endpointCopyright © 2024. All rights reserved.