public class IntegerRange extends NumericRange<Integer>
Modifier and Type | Field and Description |
---|---|
static BinaryFunction<Integer,Integer,Integer> |
DEFAULT_STEP
Calculate default step.
|
leftEndpoint, rightEndpoint, step
DEFAULT_LEFT_BOUND_TYPE, DEFAULT_RIGHT_BOUND_TYPE
Constructor and Description |
---|
IntegerRange(Endpoint<Integer> from,
Endpoint<Integer> to)
Create a new IntegerRange.
|
IntegerRange(Endpoint<Integer> from,
Endpoint<Integer> to,
int step)
Create a new IntegerRange.
|
IntegerRange(int from,
BoundType leftBoundType,
int to,
BoundType rightBoundType)
Create a new IntegerRange.
|
IntegerRange(int from,
BoundType leftBoundType,
int to,
BoundType rightBoundType,
int step)
Create a new IntegerRange.
|
IntegerRange(int from,
int to)
Create a new IntegerRange.
|
IntegerRange(int from,
int to,
int step)
Create a new IntegerRange.
|
IntegerRange(Number from,
Number to)
Create a new IntegerRange.
|
IntegerRange(Number from,
Number to,
Number step)
Create a new IntegerRange.
|
Modifier and Type | Method and Description |
---|---|
protected Iterator<Integer> |
createIterator()
Create a non-empty iterator.
|
contains
containsAll, equals, getLeftEndpoint, getRightEndpoint, getStep, hashCode, isEmpty, iterator, toString
public static final BinaryFunction<Integer,Integer,Integer> DEFAULT_STEP
public IntegerRange(Number from, Number to)
from
- startto
- endpublic IntegerRange(Number from, Number to, Number step)
from
- startto
- endstep
- incrementpublic IntegerRange(int from, int to)
from
- startto
- endpublic IntegerRange(int from, int to, int step)
from
- startto
- endstep
- incrementpublic IntegerRange(Endpoint<Integer> from, Endpoint<Integer> to)
from
- startto
- endNullPointerException
- if either Endpoint
is null
public IntegerRange(int from, BoundType leftBoundType, int to, BoundType rightBoundType)
from
- startleftBoundType
- type of left boundto
- endrightBoundType
- type of right boundNullPointerException
- if either BoundType
is null
public IntegerRange(Endpoint<Integer> from, Endpoint<Integer> to, int step)
from
- startto
- endstep
- incrementNullPointerException
- if either Endpoint
is null
public IntegerRange(int from, BoundType leftBoundType, int to, BoundType rightBoundType, int step)
from
- startleftBoundType
- type of left boundto
- endrightBoundType
- type of right boundstep
- incrementNullPointerException
- if either BoundType
is null
protected Iterator<Integer> createIterator()
createIterator
in class AbstractRange<Integer,Integer>
Copyright © 2003–2014 The Apache Software Foundation. All rights reserved.