T
- the type of numbers and step that are both a number and comparablepublic abstract class NumericRange<T extends Number & Comparable<T>> extends AbstractRange<T,T>
IntegerRange
,
LongRange
,
FloatRange
,
DoubleRange
,
CharacterRange
leftEndpoint, rightEndpoint, step
DEFAULT_LEFT_BOUND_TYPE, DEFAULT_RIGHT_BOUND_TYPE
Modifier | Constructor and Description |
---|---|
protected |
NumericRange(Endpoint<T> leftEndpoint,
Endpoint<T> rightEndpoint,
T step,
BinaryFunction<T,T,T> nextValue)
Construct a new
NumericRange . |
Modifier and Type | Method and Description |
---|---|
boolean |
contains(T obj)
Returns
true if this range contains the specified element. |
containsAll, createIterator, equals, getLeftEndpoint, getRightEndpoint, getStep, hashCode, isEmpty, iterator, toString
protected NumericRange(Endpoint<T> leftEndpoint, Endpoint<T> rightEndpoint, T step, BinaryFunction<T,T,T> nextValue)
NumericRange
.leftEndpoint
- left endpointrightEndpoint
- right endpointstep
- increment stepnextValue
- function to implement the taking of a stepCopyright © 2003–2014 The Apache Software Foundation. All rights reserved.