public interface IIterableInterval<E extends Comparable<E>,S,U,ME extends IIterableInterval<E,S,U,ME>> extends Iterable<E>, IInterval<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) |
forEach, spliteratorcontains, contains, getLeftEndpoint, getRightEndpoint, isLeftClosed, isReverse, isRightClosedIterator<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 interval is a set of decimal values, say [1..10], the step might be a decimal increment, say 0.25. Similarly, if the interval is simply a set of integers the step might also be an integer value, typically 1. Considering a date interval, 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 interval 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 © 2019. All rights reserved.