Package com.illumon.util.datastructures
Class RandomAccessDeque<T>
java.lang.Object
com.illumon.util.datastructures.RandomAccessDeque<T>
- All Implemented Interfaces:
Iterable<T>,Collection<T>
A deque, which also supports get() to an arbitrary index.
-
Constructor Summary
ConstructorsConstructorDescriptionRandomAccessDeque(int expansion) RandomAccessDeque(Collection<T> initialValues) RandomAccessDeque(Collection<T> initialValues, int expansion) -
Method Summary
Modifier and TypeMethodDescriptionbooleanbooleanaddAll(Collection<? extends T> c) voidvoidvoidclear()booleanbooleancontainsAll(Collection<?> c) get(int index) booleanisEmpty()iterator()booleanbooleanremoveAll(Collection<?> c) booleanbooleanretainAll(Collection<?> c) intsize()stream()Object[]toArray()<T1> T1[]toArray(T1[] a) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface java.util.Collection
equals, hashCode, spliterator, toArray
-
Constructor Details
-
RandomAccessDeque
public RandomAccessDeque() -
RandomAccessDeque
public RandomAccessDeque(int expansion) -
RandomAccessDeque
-
RandomAccessDeque
-
-
Method Details
-
size
public int size()- Specified by:
sizein interfaceCollection<T>
-
isEmpty
public boolean isEmpty()- Specified by:
isEmptyin interfaceCollection<T>
-
contains
- Specified by:
containsin interfaceCollection<T>
-
iterator
-
toArray
- Specified by:
toArrayin interfaceCollection<T>
-
toArray
@NotNull public <T1> T1[] toArray(@NotNull T1[] a) - Specified by:
toArrayin interfaceCollection<T>
-
add
- Specified by:
addin interfaceCollection<T>
-
containsAll
- Specified by:
containsAllin interfaceCollection<T>
-
addAll
- Specified by:
addAllin interfaceCollection<T>
-
removeAll
- Specified by:
removeAllin interfaceCollection<T>
-
retainAll
- Specified by:
retainAllin interfaceCollection<T>
-
clear
public void clear()- Specified by:
clearin interfaceCollection<T>
-
addFirst
-
addLast
-
removeIf
- Specified by:
removeIfin interfaceCollection<T>
-
remove
- Specified by:
removein interfaceCollection<T>
-
get
-
stream
- Specified by:
streamin interfaceCollection<T>
-
parallelStream
- Specified by:
parallelStreamin interfaceCollection<T>
-