Package gw.lang.reflect.interval
Class BigIntegerInterval
- java.lang.Object
-
- gw.lang.reflect.interval.AbstractInterval<E,ME>
-
- gw.lang.reflect.interval.IterableInterval<E,E,java.lang.Void,ME>
-
- gw.lang.reflect.interval.NumberInterval<java.math.BigInteger,BigIntegerInterval>
-
- gw.lang.reflect.interval.BigIntegerInterval
-
- All Implemented Interfaces:
IInterval<java.math.BigInteger,BigIntegerInterval>,IIterableInterval<java.math.BigInteger,java.math.BigInteger,java.lang.Void,BigIntegerInterval>,java.lang.Iterable<java.math.BigInteger>
public final class BigIntegerInterval extends NumberInterval<java.math.BigInteger,BigIntegerInterval>
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description private classBigIntegerInterval.ForwardIteratorprivate classBigIntegerInterval.ReverseIterator
-
Constructor Summary
Constructors Constructor Description BigIntegerInterval(java.math.BigInteger left, java.math.BigInteger right)BigIntegerInterval(java.math.BigInteger left, java.math.BigInteger right, java.math.BigInteger step, boolean bLeftClosed, boolean bRightClosed, boolean bReverse)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.math.BigIntegergetFromLeft(int iStepIndex)java.math.BigIntegergetFromRight(int iStepIndex)java.util.Iterator<java.math.BigInteger>iterateFromLeft()java.util.Iterator<java.math.BigInteger>iterateFromRight()-
Methods inherited from class gw.lang.reflect.interval.IterableInterval
equals, getStep, getUnit, hashCode, iterator, step, toString, unit
-
Methods inherited from class gw.lang.reflect.interval.AbstractInterval
contains, contains, getLeftEndpoint, getRightEndpoint, isLeftClosed, isReverse, isRightClosed
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface gw.lang.reflect.interval.IInterval
contains, contains, getLeftEndpoint, getRightEndpoint, isLeftClosed, isReverse, isRightClosed
-
-
-
-
Constructor Detail
-
BigIntegerInterval
public BigIntegerInterval(java.math.BigInteger left, java.math.BigInteger right)
-
BigIntegerInterval
public BigIntegerInterval(java.math.BigInteger left, java.math.BigInteger right, java.math.BigInteger step, boolean bLeftClosed, boolean bRightClosed, boolean bReverse)
-
-
Method Detail
-
iterateFromLeft
public java.util.Iterator<java.math.BigInteger> iterateFromLeft()
- Returns:
- An iterator that visits the elements in this interval in order, from left to right. Returns null if this interval does not support iteration.
- See Also:
IIterableInterval.iterator(),IIterableInterval.iterateFromRight()
-
iterateFromRight
public java.util.Iterator<java.math.BigInteger> iterateFromRight()
- Returns:
- An iterator that visits the elements in this interval in reverse order, from right to left. Returns null if this interval does not support iteration.
- See Also:
IIterableInterval.iterator(),IIterableInterval.iterateFromLeft()
-
getFromLeft
public java.math.BigInteger getFromLeft(int iStepIndex)
- Parameters:
iStepIndex- The index of the step from the left endpoint- Returns:
- The nth step from the left endpoint. Returns null if iStepIndex is out of bounds.
-
getFromRight
public java.math.BigInteger getFromRight(int iStepIndex)
- Parameters:
iStepIndex- The index of the step from the right endpoint- Returns:
- The nth step from the right endpoint. Returns null if iStepIndex is out of bounds.
-
-