Package io.microsphere.collection
Class DelegatingQueue<E>
- java.lang.Object
-
- io.microsphere.collection.DelegatingQueue<E>
-
- Type Parameters:
E- the type of elements held in this queue
- All Implemented Interfaces:
DelegatingWrapper,Wrapper,java.lang.Iterable<E>,java.util.Collection<E>,java.util.Queue<E>
- Direct Known Subclasses:
DelegatingDeque
public class DelegatingQueue<E> extends java.lang.Object implements java.util.Queue<E>, DelegatingWrapper
DelegatingQueue- Since:
- 1.0.0
- Author:
- Mercy
- See Also:
Queue
-
-
Constructor Summary
Constructors Constructor Description DelegatingQueue(java.util.Queue<E> delegate)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanadd(E e)booleanaddAll(java.util.Collection<? extends E> c)voidclear()booleancontains(java.lang.Object o)booleancontainsAll(java.util.Collection<?> c)Eelement()booleanequals(java.lang.Object o)voidforEach(java.util.function.Consumer<? super E> action)java.util.Queue<E>getDelegate()Get the delegateinthashCode()booleanisEmpty()java.util.Iterator<E>iterator()booleanoffer(E e)java.util.stream.Stream<E>parallelStream()Epeek()Epoll()Eremove()booleanremove(java.lang.Object o)booleanremoveAll(java.util.Collection<?> c)booleanremoveIf(java.util.function.Predicate<? super E> filter)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()-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface io.microsphere.lang.DelegatingWrapper
isWrapperFor, unwrap
-
-
-
-
Field Detail
-
delegate
protected final java.util.Queue<E> delegate
-
-
Constructor Detail
-
DelegatingQueue
public DelegatingQueue(java.util.Queue<E> delegate)
-
-
Method Detail
-
add
public boolean add(E e)
-
addAll
public boolean addAll(java.util.Collection<? extends E> c)
- Specified by:
addAllin interfacejava.util.Collection<E>
-
remove
public boolean remove(java.lang.Object o)
- Specified by:
removein interfacejava.util.Collection<E>
-
contains
public boolean contains(java.lang.Object o)
- Specified by:
containsin interfacejava.util.Collection<E>
-
size
public int size()
- Specified by:
sizein interfacejava.util.Collection<E>
-
iterator
public java.util.Iterator<E> iterator()
-
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>
-
containsAll
public boolean containsAll(java.util.Collection<?> c)
- Specified by:
containsAllin interfacejava.util.Collection<E>
-
removeAll
public boolean removeAll(java.util.Collection<?> c)
- Specified by:
removeAllin interfacejava.util.Collection<E>
-
removeIf
public boolean removeIf(java.util.function.Predicate<? super E> filter)
- Specified by:
removeIfin interfacejava.util.Collection<E>
-
retainAll
public boolean retainAll(java.util.Collection<?> c)
- Specified by:
retainAllin interfacejava.util.Collection<E>
-
clear
public void clear()
- Specified by:
clearin interfacejava.util.Collection<E>
-
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>
-
forEach
public void forEach(java.util.function.Consumer<? super E> action)
- Specified by:
forEachin interfacejava.lang.Iterable<E>
-
equals
public boolean equals(java.lang.Object o)
- Specified by:
equalsin interfacejava.util.Collection<E>- Overrides:
equalsin classjava.lang.Object
-
hashCode
public int hashCode()
- Specified by:
hashCodein interfacejava.util.Collection<E>- Overrides:
hashCodein classjava.lang.Object
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
getDelegate
public java.util.Queue<E> getDelegate()
Description copied from interface:DelegatingWrapperGet the delegate- Specified by:
getDelegatein interfaceDelegatingWrapper- Returns:
- the delegate
-
-