T - type of elementS - type of steppublic abstract class AbstractRange<T extends Comparable<T>,S> extends Object implements Range<T,S>
Range.| Modifier and Type | Field and Description |
|---|---|
protected Endpoint<T> |
leftEndpoint
Left limit.
|
protected Endpoint<T> |
rightEndpoint
Right limit.
|
protected S |
step
Increment step.
|
DEFAULT_LEFT_BOUND_TYPE, DEFAULT_RIGHT_BOUND_TYPE| Modifier | Constructor and Description |
|---|---|
protected |
AbstractRange(Endpoint<T> leftEndpoint,
Endpoint<T> rightEndpoint,
S step,
BinaryFunction<T,S,T> nextValue)
Create a new
AbstractRange. |
| Modifier and Type | Method and Description |
|---|---|
boolean |
containsAll(Collection<T> coll)
Returns
true is this range contains all of the elements in
the specified collection. |
protected abstract Iterator<T> |
createIterator()
Create a non-empty iterator.
|
boolean |
equals(Object obj) |
Endpoint<T> |
getLeftEndpoint()
Get the left limit of this range.
|
Endpoint<T> |
getRightEndpoint()
Get the right limit of this range.
|
S |
getStep()
Get the step between elements of this range.
|
int |
hashCode() |
boolean |
isEmpty()
Returns
true if this range is empty. |
Iterator<T> |
iterator() |
String |
toString() |
protected final Endpoint<T extends Comparable<T>> leftEndpoint
protected final Endpoint<T extends Comparable<T>> rightEndpoint
protected AbstractRange(Endpoint<T> leftEndpoint, Endpoint<T> rightEndpoint, S step, BinaryFunction<T,S,T> nextValue)
AbstractRange.leftEndpoint - left endpointrightEndpoint - right endpointstep - increment stepnextValue - function to implement the taking of a steppublic Endpoint<T> getLeftEndpoint()
getLeftEndpoint in interface Range<T extends Comparable<T>,S>public Endpoint<T> getRightEndpoint()
getRightEndpoint in interface Range<T extends Comparable<T>,S>public boolean containsAll(Collection<T> coll)
true is this range contains all of the elements in
the specified collection.containsAll in interface Range<T extends Comparable<T>,S>coll - collection to be checked for the containment in this rangetrue if this range contains all of the elements in
the specified collectionpublic final Iterator<T> iterator()
iterator in interface Iterable<T extends Comparable<T>>protected abstract Iterator<T> createIterator()
Copyright © 2003–2014 The Apache Software Foundation. All rights reserved.