Package org.ujmp.core.collections.list
Class ArrayIndexList<M>
java.lang.Object
java.util.AbstractCollection<E>
java.util.AbstractList<E>
java.util.ArrayList<M>
org.ujmp.core.collections.list.ArrayIndexList<M>
- Type Parameters:
M
- Type of the elements in the list
- All Implemented Interfaces:
Serializable
,Cloneable
,Iterable<M>
,Collection<M>
,List<M>
,RandomAccess
- Direct Known Subclasses:
Dictionary
ArrayIndexList is like an ArrayList, but keeps track of the indices where
objects have been added. This improves the speed of indexOf() and contains()
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final long
Fields inherited from class java.util.AbstractList
modCount
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
boolean
boolean
addAll
(int index, Collection<? extends M> c) boolean
addAll
(Collection<? extends M> c) void
clear()
boolean
int
int
remove
(int index) boolean
Methods inherited from class java.util.ArrayList
clone, ensureCapacity, forEach, get, isEmpty, iterator, listIterator, listIterator, removeAll, removeIf, removeRange, replaceAll, retainAll, size, sort, spliterator, subList, toArray, toArray, trimToSize
Methods inherited from class java.util.AbstractList
equals, hashCode
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
Methods inherited from interface java.util.List
containsAll, equals, hashCode
-
Field Details
-
serialVersionUID
private static final long serialVersionUID- See Also:
-
indexMap
-
-
Constructor Details
-
ArrayIndexList
public ArrayIndexList() -
ArrayIndexList
-
-
Method Details
-
add
-
add
-
addAll
-
addAll
-
clear
public void clear() -
contains
-
indexOf
-
lastIndexOf
- Specified by:
lastIndexOf
in interfaceList<M>
- Overrides:
lastIndexOf
in classArrayList<M>
-
remove
-
remove
-
set
-