Package com.illumon.util.datastructures
Class RandomAccessDeque<T>
java.lang.Object
com.illumon.util.datastructures.RandomAccessDeque<T>
- All Implemented Interfaces:
Iterable<T>,Collection<T>
public class RandomAccessDeque<T> extends Object implements Collection<T>
A deque, which also supports get() to an arbitrary index.
-
Constructor Summary
Constructors Constructor Description RandomAccessDeque()RandomAccessDeque(int expansion)RandomAccessDeque(Collection<T> initialValues)RandomAccessDeque(Collection<T> initialValues, int expansion) -
Method Summary
Modifier and Type Method Description booleanadd(T t)booleanaddAll(Collection<? extends T> c)voidaddFirst(T vv)voidaddLast(T vv)voidclear()booleancontains(Object o)booleancontainsAll(Collection<?> c)Tget(int index)booleanisEmpty()Iterator<T>iterator()Stream<T>parallelStream()booleanremove(Object entry)booleanremoveAll(Collection<?> c)booleanremoveIf(Predicate<? super T> predicate)booleanretainAll(Collection<?> c)intsize()Stream<T>stream()Object[]toArray()<T1> T1[]toArray(T1[] a)
-
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>
-