- All Implemented Interfaces:
Iterable<BigInteger>
,Collection<BigInteger>
,List<BigInteger>
Items for Spinner providing an BigInteger range without actually creating a list with all values.
Beware: because this is still based on the list inteface, the maximum size of the list is limited by the type used for the index in the list: an integer (Integer.MAX_VALUE).
So the difference between the from and to values (to-from) cannot be larger than Integer.MAX_VALUE.
What this class allows is that this range can be anywhere in the BigInteger's range.
-
Field Summary
FieldsFields inherited from class java.util.AbstractList
modCount
-
Constructor Summary
ConstructorsConstructorDescriptionListSpinnerBigIntegerList
(BigInteger from, BigInteger to) ListSpinnerBigIntegerList
(BigInteger from, BigInteger to, BigInteger step) -
Method Summary
Methods inherited from class java.util.AbstractList
add, add, addAll, clear, equals, hashCode, iterator, lastIndexOf, listIterator, listIterator, remove, removeRange, set, subList
Methods inherited from class java.util.AbstractCollection
addAll, contains, containsAll, isEmpty, remove, removeAll, retainAll, toArray, toArray, toString
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface java.util.Collection
parallelStream, removeIf, stream, toArray
Methods inherited from interface java.util.List
addAll, contains, containsAll, isEmpty, remove, removeAll, replaceAll, retainAll, sort, spliterator, toArray, toArray
-
Field Details
-
from
-
size
private int size -
step
-
-
Constructor Details
-
ListSpinnerBigIntegerList
public ListSpinnerBigIntegerList() -
ListSpinnerBigIntegerList
- Parameters:
from
-to
-
-
ListSpinnerBigIntegerList
- Parameters:
from
-to
-step
-
-
-
Method Details
-
get
- Specified by:
get
in interfaceList<BigInteger>
- Specified by:
get
in classAbstractList<BigInteger>
-
indexOf
- Specified by:
indexOf
in interfaceList<BigInteger>
- Overrides:
indexOf
in classAbstractList<BigInteger>
-
size
public int size()- Specified by:
size
in interfaceCollection<BigInteger>
- Specified by:
size
in interfaceList<BigInteger>
- Specified by:
size
in classAbstractCollection<BigInteger>
-