public class NumberList extends ArrayList<Integer> implements Serializable
modCount
Constructor and Description |
---|
NumberList()
Default constructor.
|
NumberList(int minValue,
int maxValue,
boolean allowsNegativeValues)
Constructor with limits.
|
NumberList(String aString)
Constructor.
|
NumberList(String aString,
int minValue,
int maxValue,
boolean allowsNegativeValues) |
Modifier and Type | Method and Description |
---|---|
boolean |
add(Integer aNumber) |
static NumberList |
parse(String numberString) |
String |
toString() |
add, addAll, addAll, clear, clone, contains, ensureCapacity, forEach, get, indexOf, isEmpty, iterator, lastIndexOf, listIterator, listIterator, remove, remove, removeAll, removeIf, removeRange, replaceAll, retainAll, set, size, sort, spliterator, subList, toArray, toArray, trimToSize
equals, hashCode
containsAll
finalize, getClass, notify, notifyAll, wait, wait, wait
containsAll, equals, hashCode
parallelStream, stream
public NumberList()
public NumberList(int minValue, int maxValue, boolean allowsNegativeValues)
minValue
- the minimum allowable valuemaxValue
- the maximum allowable valueallowsNegativeValues
- indicates whether negative values are allowedpublic NumberList(String aString)
aString
- a string representation of a number listpublic NumberList(String aString, int minValue, int maxValue, boolean allowsNegativeValues)
aString
- a string representation of a number listminValue
- the minimum allowable valuemaxValue
- the maximum allowable valueallowsNegativeValues
- indicates whether negative values are allowedpublic final boolean add(Integer aNumber)
public final String toString()
toString
in class AbstractCollection<Integer>
public static NumberList parse(String numberString)