Package org.onlab.util
Class UnmodifiableDeque<E>
- java.lang.Object
-
- org.onlab.util.UnmodifiableDeque<E>
-
- All Implemented Interfaces:
java.lang.Iterable<E>,java.util.Collection<E>,java.util.Deque<E>,java.util.Queue<E>
public class UnmodifiableDeque<E> extends java.lang.Object implements java.util.Deque<E>Unmodifiable view of the specified Deque.
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanadd(E e)booleanaddAll(java.util.Collection<? extends E> c)voidaddFirst(E e)voidaddLast(E e)voidclear()booleancontains(java.lang.Object o)booleancontainsAll(java.util.Collection<?> c)java.util.Iterator<E>descendingIterator()Eelement()booleanequals(java.lang.Object o)voidforEach(java.util.function.Consumer<? super E> action)EgetFirst()EgetLast()inthashCode()booleanisEmpty()java.util.Iterator<E>iterator()booleanoffer(E e)booleanofferFirst(E e)booleanofferLast(E e)java.util.stream.Stream<E>parallelStream()Epeek()EpeekFirst()EpeekLast()Epoll()EpollFirst()EpollLast()Epop()voidpush(E e)Eremove()booleanremove(java.lang.Object o)booleanremoveAll(java.util.Collection<?> c)EremoveFirst()booleanremoveFirstOccurrence(java.lang.Object o)booleanremoveIf(java.util.function.Predicate<? super E> filter)EremoveLast()booleanremoveLastOccurrence(java.lang.Object o)booleanretainAll(java.util.Collection<?> c)intsize()java.util.Spliterator<E>spliterator()java.util.stream.Stream<E>stream()java.lang.Object[]toArray()<T> T[]toArray(T[] a)java.lang.StringtoString()static <T> java.util.Deque<T>unmodifiableDeque(java.util.Deque<T> deque)Returns an unmodifiable view of the specified Deque.
-
-
-
Method Detail
-
unmodifiableDeque
public static <T> java.util.Deque<T> unmodifiableDeque(java.util.Deque<T> deque)
Returns an unmodifiable view of the specified Deque.- Type Parameters:
T- type- Parameters:
deque- underlyingDequeto use.- Returns:
- unmodifiable view of
deque
-
forEach
public void forEach(java.util.function.Consumer<? super E> action)
- Specified by:
forEachin interfacejava.lang.Iterable<E>
-
isEmpty
public boolean isEmpty()
- Specified by:
isEmptyin interfacejava.util.Collection<E>
-
toArray
public java.lang.Object[] toArray()
- Specified by:
toArrayin interfacejava.util.Collection<E>
-
toArray
public <T> T[] toArray(T[] a)
- Specified by:
toArrayin interfacejava.util.Collection<E>
-
removeFirstOccurrence
public boolean removeFirstOccurrence(java.lang.Object o)
- Specified by:
removeFirstOccurrencein interfacejava.util.Deque<E>
-
removeLastOccurrence
public boolean removeLastOccurrence(java.lang.Object o)
- Specified by:
removeLastOccurrencein interfacejava.util.Deque<E>
-
containsAll
public boolean containsAll(java.util.Collection<?> c)
- Specified by:
containsAllin interfacejava.util.Collection<E>
-
add
public boolean add(E e)
-
addAll
public boolean addAll(java.util.Collection<? extends E> c)
-
offer
public boolean offer(E e)
-
removeAll
public boolean removeAll(java.util.Collection<?> c)
- Specified by:
removeAllin interfacejava.util.Collection<E>
-
remove
public E remove()
-
poll
public E poll()
-
element
public E element()
-
removeIf
public boolean removeIf(java.util.function.Predicate<? super E> filter)
- Specified by:
removeIfin interfacejava.util.Collection<E>
-
peek
public E peek()
-
retainAll
public boolean retainAll(java.util.Collection<?> c)
- Specified by:
retainAllin interfacejava.util.Collection<E>
-
remove
public boolean remove(java.lang.Object o)
-
clear
public void clear()
- Specified by:
clearin interfacejava.util.Collection<E>
-
equals
public boolean equals(java.lang.Object o)
- Specified by:
equalsin interfacejava.util.Collection<E>- Overrides:
equalsin classjava.lang.Object
-
contains
public boolean contains(java.lang.Object o)
-
size
public int size()
-
iterator
public java.util.Iterator<E> iterator()
-
descendingIterator
public java.util.Iterator<E> descendingIterator()
- Specified by:
descendingIteratorin interfacejava.util.Deque<E>
-
hashCode
public int hashCode()
- Specified by:
hashCodein interfacejava.util.Collection<E>- Overrides:
hashCodein classjava.lang.Object
-
spliterator
public java.util.Spliterator<E> spliterator()
-
stream
public java.util.stream.Stream<E> stream()
- Specified by:
streamin interfacejava.util.Collection<E>
-
parallelStream
public java.util.stream.Stream<E> parallelStream()
- Specified by:
parallelStreamin interfacejava.util.Collection<E>
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
-