Package randoop.util
Class SimpleArrayList<E>
- java.lang.Object
-
- java.util.AbstractCollection<E>
-
- java.util.AbstractList<E>
-
- java.util.ArrayList<E>
-
- randoop.util.SimpleArrayList<E>
-
- All Implemented Interfaces:
Serializable
,Cloneable
,Iterable<E>
,Collection<E>
,List<E>
,RandomAccess
,SimpleList<E>
public class SimpleArrayList<E> extends ArrayList<E> implements SimpleList<E>, Serializable
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description private static long
serialVersionUID
-
Fields inherited from class java.util.AbstractList
modCount
-
-
Constructor Summary
Constructors Constructor Description SimpleArrayList()
SimpleArrayList(int initialCapacity)
SimpleArrayList(Collection<? extends E> c)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description SimpleList<E>
getSublist(int index)
Return a sublist of this list that contains the index.List<E>
toJDKList()
Returns a java.util.List version of this list.-
Methods inherited from class java.util.ArrayList
add, add, addAll, 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, toString
-
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
-
Methods inherited from interface randoop.util.SimpleList
get, isEmpty, size
-
-
-
-
Field Detail
-
serialVersionUID
private static final long serialVersionUID
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
SimpleArrayList
public SimpleArrayList(Collection<? extends E> c)
-
SimpleArrayList
public SimpleArrayList()
-
SimpleArrayList
public SimpleArrayList(int initialCapacity)
-
-
Method Detail
-
getSublist
public SimpleList<E> getSublist(int index)
Description copied from interface:SimpleList
Return a sublist of this list that contains the index. Does not necessarily contain the first element.The result is always an existing SimpleList, the smallest one that contains the index. Currently, it is always a
SimpleArrayList
.- Specified by:
getSublist
in interfaceSimpleList<E>
- Parameters:
index
- the index into this list- Returns:
- the sublist containing this index
-
toJDKList
public List<E> toJDKList()
Description copied from interface:SimpleList
Returns a java.util.List version of this list. Caution: this operation can be expensive.- Specified by:
toJDKList
in interfaceSimpleList<E>
- Returns:
List
for this list
-
-