public class UnmodifiableDeque<E>
extends java.lang.Object
implements java.util.Deque<E>
Modifier and Type | Method and Description |
---|---|
boolean |
add(E e) |
boolean |
addAll(java.util.Collection<? extends E> c) |
void |
addFirst(E e) |
void |
addLast(E e) |
void |
clear() |
boolean |
contains(java.lang.Object o) |
boolean |
containsAll(java.util.Collection<?> c) |
java.util.Iterator<E> |
descendingIterator() |
E |
element() |
boolean |
equals(java.lang.Object o) |
void |
forEach(java.util.function.Consumer<? super E> action) |
E |
getFirst() |
E |
getLast() |
int |
hashCode() |
boolean |
isEmpty() |
java.util.Iterator<E> |
iterator() |
boolean |
offer(E e) |
boolean |
offerFirst(E e) |
boolean |
offerLast(E e) |
java.util.stream.Stream<E> |
parallelStream() |
E |
peek() |
E |
peekFirst() |
E |
peekLast() |
E |
poll() |
E |
pollFirst() |
E |
pollLast() |
E |
pop() |
void |
push(E e) |
E |
remove() |
boolean |
remove(java.lang.Object o) |
boolean |
removeAll(java.util.Collection<?> c) |
E |
removeFirst() |
boolean |
removeFirstOccurrence(java.lang.Object o) |
boolean |
removeIf(java.util.function.Predicate<? super E> filter) |
E |
removeLast() |
boolean |
removeLastOccurrence(java.lang.Object o) |
boolean |
retainAll(java.util.Collection<?> c) |
int |
size() |
java.util.Spliterator<E> |
spliterator() |
java.util.stream.Stream<E> |
stream() |
java.lang.Object[] |
toArray() |
<T> T[] |
toArray(T[] a) |
java.lang.String |
toString() |
static <T> java.util.Deque<T> |
unmodifiableDeque(java.util.Deque<T> deque)
Returns an unmodifiable view of the specified Deque.
|
public static <T> java.util.Deque<T> unmodifiableDeque(java.util.Deque<T> deque)
T
- typedeque
- underlying Deque
to use.deque
public void forEach(java.util.function.Consumer<? super E> action)
forEach
in interface java.lang.Iterable<E>
public boolean isEmpty()
isEmpty
in interface java.util.Collection<E>
public java.lang.Object[] toArray()
toArray
in interface java.util.Collection<E>
public <T> T[] toArray(T[] a)
toArray
in interface java.util.Collection<E>
public boolean removeFirstOccurrence(java.lang.Object o)
removeFirstOccurrence
in interface java.util.Deque<E>
public boolean removeLastOccurrence(java.lang.Object o)
removeLastOccurrence
in interface java.util.Deque<E>
public boolean containsAll(java.util.Collection<?> c)
containsAll
in interface java.util.Collection<E>
public boolean add(E e)
public boolean addAll(java.util.Collection<? extends E> c)
addAll
in interface java.util.Collection<E>
public boolean offer(E e)
public boolean removeAll(java.util.Collection<?> c)
removeAll
in interface java.util.Collection<E>
public E remove()
public E poll()
public E element()
public boolean removeIf(java.util.function.Predicate<? super E> filter)
removeIf
in interface java.util.Collection<E>
public E peek()
public boolean retainAll(java.util.Collection<?> c)
retainAll
in interface java.util.Collection<E>
public boolean remove(java.lang.Object o)
public void clear()
clear
in interface java.util.Collection<E>
public boolean equals(java.lang.Object o)
equals
in interface java.util.Collection<E>
equals
in class java.lang.Object
public boolean contains(java.lang.Object o)
public int size()
public java.util.Iterator<E> iterator()
public java.util.Iterator<E> descendingIterator()
descendingIterator
in interface java.util.Deque<E>
public int hashCode()
hashCode
in interface java.util.Collection<E>
hashCode
in class java.lang.Object
public java.util.Spliterator<E> spliterator()
public java.util.stream.Stream<E> stream()
stream
in interface java.util.Collection<E>
public java.util.stream.Stream<E> parallelStream()
parallelStream
in interface java.util.Collection<E>
public java.lang.String toString()
toString
in class java.lang.Object