public class DynamicList<T extends MutableNumericID> extends AbstractList<T> implements ArrayWritable<T>, Serializable
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(@Nullable Object elem) |
boolean |
remove(@Nullable Object elem,
@Nullable IDChangeNotifier<T> tracker) |
T |
safeGet(int index) |
int |
size()
The size of this container.
|
void |
swap(int a,
int b) |
void |
writeToArray(int offset,
@Nullable 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 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 remove(@Nullable 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(@Nullable Object elem, @Nullable IDChangeNotifier<T> tracker)
public T remove(int index, IDChangeNotifier<T> tracker)
public T safeGet(int index)
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 T get(int index)
get
in interface List<T extends MutableNumericID>
get
in class AbstractList<T extends MutableNumericID>
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 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 void swap(int a, int b)
public void writeToArray(int offset, @Nullable 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 © 2020. All rights reserved.