Package net.fortuna.ical4j.model
Class NumberList
- java.lang.Object
-
- java.util.AbstractCollection<E>
-
- java.util.AbstractList<E>
-
- java.util.ArrayList<Integer>
-
- net.fortuna.ical4j.model.NumberList
-
- All Implemented Interfaces:
Serializable
,Cloneable
,Iterable<Integer>
,Collection<Integer>
,List<Integer>
,RandomAccess
public class NumberList extends ArrayList<Integer> implements Serializable
$Id$ [29-May-2004] Defines a list of numbers.- See Also:
- Serialized Form
-
-
Field Summary
-
Fields inherited from class java.util.AbstractList
modCount
-
-
Constructor Summary
Constructors Constructor Description NumberList()
Default constructor.NumberList(int minValue, int maxValue, boolean allowsNegativeValues)
Deprecated.NumberList(String aString)
Constructor.NumberList(String aString, int minValue, int maxValue, boolean allowsNegativeValues)
Deprecated.NumberList(String aString, ValueRange valueRange, boolean allowsNegativeValues)
Construct a number list restricted by the specifiedValueRange
.NumberList(ValueRange valueRange, boolean allowsNegativeValues)
Construct a number list restricted by the specifiedValueRange
.NumberList(Collection<Integer> values, ValueRange valueRange, boolean allowsNegativeValues)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
add(Integer aNumber)
boolean
addAll(Collection<? extends Integer> c)
static NumberList
parse(String numberString)
String
toString()
static String
toString(List<Integer> list)
-
Methods inherited from class java.util.ArrayList
add, addAll, clear, clone, contains, ensureCapacity, equals, forEach, get, hashCode, indexOf, isEmpty, iterator, lastIndexOf, listIterator, listIterator, remove, remove, removeAll, removeIf, removeRange, replaceAll, retainAll, set, size, sort, spliterator, subList, toArray, toArray, trimToSize
-
Methods inherited from class java.util.AbstractCollection
containsAll
-
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface java.util.Collection
parallelStream, stream, toArray
-
Methods inherited from interface java.util.List
containsAll
-
-
-
-
Constructor Detail
-
NumberList
public NumberList()
Default constructor.
-
NumberList
public NumberList(ValueRange valueRange, boolean allowsNegativeValues)
Construct a number list restricted by the specifiedValueRange
.- Parameters:
valueRange
- a range defining the lower and upper bounds of allowed valuesallowsNegativeValues
- allow negative values, where abs(value) is within the specified range
-
NumberList
@Deprecated public NumberList(int minValue, int maxValue, boolean allowsNegativeValues)
Deprecated.Constructor with limits.- Parameters:
minValue
- the minimum allowable valuemaxValue
- the maximum allowable valueallowsNegativeValues
- indicates whether negative values are allowed
-
NumberList
public NumberList(String aString)
Constructor.- Parameters:
aString
- a string representation of a number list
-
NumberList
public NumberList(String aString, ValueRange valueRange, boolean allowsNegativeValues)
Construct a number list restricted by the specifiedValueRange
.- Parameters:
aString
- a string representation of a list of valuesvalueRange
- a range defining the lower and upper bounds of allowed valuesallowsNegativeValues
- allow negative values, where abs(value) is within the specified range
-
NumberList
public NumberList(Collection<Integer> values, ValueRange valueRange, boolean allowsNegativeValues)
-
NumberList
@Deprecated public NumberList(String aString, int minValue, int maxValue, boolean allowsNegativeValues)
Deprecated.- Parameters:
aString
- a string representation of a number listminValue
- the minimum allowable valuemaxValue
- the maximum allowable valueallowsNegativeValues
- indicates whether negative values are allowed
-
-
Method Detail
-
add
public final boolean add(Integer aNumber)
-
addAll
public boolean addAll(Collection<? extends Integer> c)
-
toString
public final String toString()
- Overrides:
toString
in classAbstractCollection<Integer>
-
parse
public static NumberList parse(String numberString)
-
-