public abstract class AbstractIterableRange<E extends java.lang.Comparable<E>,S,U,ME extends AbstractIterableRange<E,S,U,ME>> extends AbstractRange<E,ME> implements IterableRange<E,S,U,ME>
| Constructor and Description |
|---|
AbstractIterableRange(E left,
E right,
S step) |
AbstractIterableRange(E left,
E right,
S step,
U unit,
boolean leftClosed,
boolean rightClosed,
boolean reverse) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(java.lang.Object o) |
S |
getStep() |
U |
getUnit() |
int |
hashCode() |
java.util.Iterator<E> |
iterator() |
ME |
step(S s) |
java.lang.String |
toString() |
ME |
unit(U u) |
contains, contains, getLeftEndpoint, getRightEndpoint, isLeftClosed, isReversed, isRightClosedclone, finalize, getClass, jailbreak, notify, notifyAll, wait, wait, waitgetFromLeft, getFromRight, iterateFromLeft, iterateFromRightcount, 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, mapIndexedTo, mapNotNull, mapNotNullTo, mapTo, mapToList, maxWith, minWith, partition, reversed, single, single, singleOrNull, singleOrNull, spliterator, subList, subList, subtract, toList, toSet, unioncontains, contains, getLeftEndpoint, getRightEndpoint, isLeftClosed, isReversed, isRightClosedpublic java.util.Iterator<E> iterator()
iterator in interface java.lang.Iterable<E extends java.lang.Comparable<E>>iterator in interface IterableRange<E extends java.lang.Comparable<E>,S,U,ME extends AbstractIterableRange<E,S,U,ME>>IterableRange.iterateFromLeft(),
IterableRange.iterateFromRight()public S getStep()
getStep in interface IterableRange<E extends java.lang.Comparable<E>,S,U,ME extends AbstractIterableRange<E,S,U,ME>>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().
public U getUnit()
public boolean equals(java.lang.Object o)
equals in class AbstractRange<E extends java.lang.Comparable<E>,ME extends AbstractIterableRange<E,S,U,ME>>public int hashCode()
hashCode in class AbstractRange<E extends java.lang.Comparable<E>,ME extends AbstractIterableRange<E,S,U,ME>>public java.lang.String toString()
toString in class AbstractRange<E extends java.lang.Comparable<E>,ME extends AbstractIterableRange<E,S,U,ME>>Copyright © 2022. All rights reserved.