Package moa.core
Class AutoExpandVector<T>
- java.lang.Object
-
- java.util.AbstractCollection<E>
-
- java.util.AbstractList<E>
-
- java.util.ArrayList<T>
-
- moa.core.AutoExpandVector<T>
-
- All Implemented Interfaces:
Serializable
,Cloneable
,Iterable<T>
,Collection<T>
,List<T>
,RandomAccess
,MOAObject
public class AutoExpandVector<T> extends ArrayList<T> implements MOAObject
Vector with the capability of automatic expansion.- Version:
- $Revision: 7 $
- Author:
- Richard Kirkby (rkirkby@cs.waikato.ac.nz)
- See Also:
- Serialized Form
-
-
Field Summary
-
Fields inherited from class java.util.AbstractList
modCount
-
-
Constructor Summary
Constructors Constructor Description AutoExpandVector()
AutoExpandVector(int size)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
add(int pos, T obj)
boolean
add(T arg0)
boolean
addAll(int arg0, Collection<? extends T> arg1)
boolean
addAll(Collection<? extends T> arg0)
void
clear()
MOAObject
copy()
This method produces a copy of this object.T
get(int pos)
void
getDescription(StringBuilder sb, int indent)
Returns a string representation of this object.int
measureByteSize()
Gets the memory size of this object.T
remove(int arg0)
boolean
remove(Object arg0)
protected void
removeRange(int arg0, int arg1)
T
set(int pos, T obj)
-
Methods inherited from class java.util.ArrayList
clone, contains, ensureCapacity, equals, forEach, hashCode, indexOf, isEmpty, iterator, lastIndexOf, listIterator, listIterator, removeAll, removeIf, replaceAll, retainAll, 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
-
-
-
-
Method Detail
-
add
public void add(int pos, T obj)
-
get
public T get(int pos)
-
add
public boolean add(T arg0)
-
addAll
public boolean addAll(Collection<? extends T> arg0)
-
addAll
public boolean addAll(int arg0, Collection<? extends T> arg1)
-
clear
public void clear()
-
remove
public T remove(int arg0)
-
remove
public boolean remove(Object arg0)
-
removeRange
protected void removeRange(int arg0, int arg1)
- Overrides:
removeRange
in classArrayList<T>
-
copy
public MOAObject copy()
Description copied from interface:MOAObject
This method produces a copy of this object.
-
measureByteSize
public int measureByteSize()
Description copied from interface:MOAObject
Gets the memory size of this object.- Specified by:
measureByteSize
in interfaceMOAObject
- Returns:
- the memory size of this object
-
getDescription
public void getDescription(StringBuilder sb, int indent)
Description copied from interface:MOAObject
Returns a string representation of this object. Used inAbstractMOAObject.toString
to give a string representation of the object.- Specified by:
getDescription
in interfaceMOAObject
- Parameters:
sb
- the stringbuilder to add the descriptionindent
- the number of characters to indent
-
-