Package net.automatalib.common.util.nid
Class DynamicList<T extends MutableNumericID>
- java.lang.Object
-
- java.util.AbstractCollection<E>
-
- java.util.AbstractList<T>
-
- net.automatalib.common.util.nid.DynamicList<T>
-
- All Implemented Interfaces:
Iterable<T>,Collection<T>,List<T>,ArrayWritable<T>
public class DynamicList<T extends MutableNumericID> extends AbstractList<T> implements ArrayWritable<T>
-
-
Field Summary
-
Fields inherited from class java.util.AbstractList
modCount
-
-
Constructor Summary
Constructors Constructor Description DynamicList()DynamicList(List<? extends T> initial)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanadd(T elem)voidclear()Tget(int index)booleanisEmpty()Iterator<T>iterator()Tremove(int index, IDChangeNotifier<T> tracker)booleanremove(@Nullable Object elem)booleanremove(@Nullable Object elem, @Nullable IDChangeNotifier<T> tracker)@Nullable TsafeGet(int index)intsize()voidswap(int a, int b)voidwriteToArray(int offset, @Nullable Object[] array, int tgtOfs, int num)-
Methods inherited from class java.util.AbstractList
add, addAll, equals, hashCode, indexOf, lastIndexOf, listIterator, listIterator, remove, removeRange, set, subList
-
Methods inherited from class java.util.AbstractCollection
addAll, contains, containsAll, removeAll, retainAll, toArray, toArray, toString
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface java.util.Collection
parallelStream, removeIf, stream
-
Methods inherited from interface java.util.List
addAll, contains, containsAll, removeAll, replaceAll, retainAll, sort, spliterator, toArray, toArray
-
-
-
-
Method Detail
-
size
public int size()
- Specified by:
sizein interfaceArrayWritable<T extends MutableNumericID>- Specified by:
sizein interfaceCollection<T extends MutableNumericID>- Specified by:
sizein interfaceList<T extends MutableNumericID>- Specified by:
sizein classAbstractCollection<T extends MutableNumericID>
-
isEmpty
public boolean isEmpty()
- Specified by:
isEmptyin interfaceCollection<T extends MutableNumericID>- Specified by:
isEmptyin interfaceList<T extends MutableNumericID>- Overrides:
isEmptyin classAbstractCollection<T extends MutableNumericID>
-
remove
public boolean remove(@Nullable Object elem)
- Specified by:
removein interfaceCollection<T extends MutableNumericID>- Specified by:
removein interfaceList<T extends MutableNumericID>- Overrides:
removein classAbstractCollection<T extends MutableNumericID>
-
remove
public boolean remove(@Nullable Object elem, @Nullable IDChangeNotifier<T> tracker)
-
remove
public T remove(int index, IDChangeNotifier<T> tracker)
-
add
public boolean add(T elem)
- Specified by:
addin interfaceCollection<T extends MutableNumericID>- Specified by:
addin interfaceList<T extends MutableNumericID>- Overrides:
addin classAbstractList<T extends MutableNumericID>
-
get
public T get(int index)
- Specified by:
getin interfaceList<T extends MutableNumericID>- Specified by:
getin classAbstractList<T extends MutableNumericID>
-
clear
public void clear()
- Specified by:
clearin interfaceCollection<T extends MutableNumericID>- Specified by:
clearin interfaceList<T extends MutableNumericID>- Overrides:
clearin classAbstractList<T extends MutableNumericID>
-
iterator
public Iterator<T> iterator()
- Specified by:
iteratorin interfaceCollection<T extends MutableNumericID>- Specified by:
iteratorin interfaceIterable<T extends MutableNumericID>- Specified by:
iteratorin interfaceList<T extends MutableNumericID>- Overrides:
iteratorin classAbstractList<T extends MutableNumericID>
-
swap
public void swap(int a, int b)
-
writeToArray
public void writeToArray(int offset, @Nullable Object[] array, int tgtOfs, int num)- Specified by:
writeToArrayin interfaceArrayWritable<T extends MutableNumericID>
-
-