public class DynamicList<T extends MutableNumericID> extends AbstractList<T> implements ArrayWritable<T>
modCount
Constructor and Description |
---|
DynamicList() |
Modifier and Type | Method and Description |
---|---|
boolean |
add(T elem) |
void |
clear() |
T |
get(int index) |
boolean |
isEmpty() |
Iterator<T> |
iterator() |
T |
remove(int index,
IDChangeNotifier<T> tracker) |
boolean |
remove(Object elem) |
boolean |
remove(Object elem,
IDChangeNotifier<T> tracker) |
T |
safeGet(int index) |
int |
size()
The size of this container.
|
void |
swap(int a,
int b) |
void |
writeToArray(int offset,
Object[] array,
int tgtOfs,
int num)
Writes the contents of this container to an array.
|
add, addAll, equals, hashCode, indexOf, lastIndexOf, listIterator, listIterator, remove, removeRange, set, subList
addAll, contains, containsAll, removeAll, retainAll, toArray, toArray, toString
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
addAll, contains, containsAll, removeAll, replaceAll, retainAll, sort, spliterator, toArray, toArray
parallelStream, removeIf, stream
public DynamicList()
public Iterator<T> iterator()
iterator
in interface Iterable<T extends MutableNumericID>
iterator
in interface Collection<T extends MutableNumericID>
iterator
in interface List<T extends MutableNumericID>
iterator
in class AbstractList<T extends MutableNumericID>
public int size()
ArrayWritable
size
in interface Collection<T extends MutableNumericID>
size
in interface List<T extends MutableNumericID>
size
in interface ArrayWritable<T extends MutableNumericID>
size
in class AbstractCollection<T extends MutableNumericID>
public boolean isEmpty()
isEmpty
in interface Collection<T extends MutableNumericID>
isEmpty
in interface List<T extends MutableNumericID>
isEmpty
in class AbstractCollection<T extends MutableNumericID>
public boolean add(T elem)
add
in interface Collection<T extends MutableNumericID>
add
in interface List<T extends MutableNumericID>
add
in class AbstractList<T extends MutableNumericID>
public void swap(int a, int b)
public T get(int index)
get
in interface List<T extends MutableNumericID>
get
in class AbstractList<T extends MutableNumericID>
public boolean remove(Object elem)
remove
in interface Collection<T extends MutableNumericID>
remove
in interface List<T extends MutableNumericID>
remove
in class AbstractCollection<T extends MutableNumericID>
public boolean remove(Object elem, IDChangeNotifier<T> tracker)
public T remove(int index, IDChangeNotifier<T> tracker)
public void clear()
clear
in interface Collection<T extends MutableNumericID>
clear
in interface List<T extends MutableNumericID>
clear
in class AbstractList<T extends MutableNumericID>
public void writeToArray(int offset, Object[] array, int tgtOfs, int num)
ArrayWritable
System.arraycopy(this.toArray(), offset, array, tgtOfs, num);
writeToArray
in interface ArrayWritable<T extends MutableNumericID>
offset
- how many elements of this container to skip.array
- the array in which to store the elements.tgtOfs
- the starting offset in the target array.num
- the maximum number of elements to copy.Copyright © 2015. All Rights Reserved.