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 boolean
add(T t)
boolean
addAll(Collection<? extends T> c)
void
addFirst(T vv)
void
addLast(T vv)
void
clear()
boolean
contains(Object o)
boolean
containsAll(Collection<?> c)
T
get(int index)
boolean
isEmpty()
Iterator<T>
iterator()
Stream<T>
parallelStream()
boolean
remove(Object entry)
boolean
removeAll(Collection<?> c)
boolean
removeIf(Predicate<? super T> predicate)
boolean
retainAll(Collection<?> c)
int
size()
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:
size
in interfaceCollection<T>
-
isEmpty
public boolean isEmpty()- Specified by:
isEmpty
in interfaceCollection<T>
-
contains
- Specified by:
contains
in interfaceCollection<T>
-
iterator
-
toArray
- Specified by:
toArray
in interfaceCollection<T>
-
toArray
@NotNull public <T1> T1[] toArray(@NotNull T1[] a)- Specified by:
toArray
in interfaceCollection<T>
-
add
- Specified by:
add
in interfaceCollection<T>
-
containsAll
- Specified by:
containsAll
in interfaceCollection<T>
-
addAll
- Specified by:
addAll
in interfaceCollection<T>
-
removeAll
- Specified by:
removeAll
in interfaceCollection<T>
-
retainAll
- Specified by:
retainAll
in interfaceCollection<T>
-
clear
public void clear()- Specified by:
clear
in interfaceCollection<T>
-
addFirst
-
addLast
-
removeIf
- Specified by:
removeIf
in interfaceCollection<T>
-
remove
- Specified by:
remove
in interfaceCollection<T>
-
get
-
stream
- Specified by:
stream
in interfaceCollection<T>
-
parallelStream
- Specified by:
parallelStream
in interfaceCollection<T>
-