Class AbstractUnimplementedQueue<T>
- java.lang.Object
-
- com.salesforce.reactivegrpc.common.AbstractUnimplementedQueue<T>
-
- Type Parameters:
T- T
- All Implemented Interfaces:
Iterable<T>,Collection<T>,Queue<T>
- Direct Known Subclasses:
AbstractStreamObserverAndPublisher
public abstract class AbstractUnimplementedQueue<T> extends Object implements Queue<T>
AbstractUnimplementedQueueprovides a base class for implementing reactive operation fusion queues in a framework agnostic way. RxJava and Reactor both have the concept of a "simple queue", which lacks most of the complexity ofjava.util.Queue, however, these interfaces are not interoperable when writing shared code.This class implements the unused (not "simple") parts
java.util.Queuesuch that they throwUnsupportedOperationExceptionso that subclasses only have to implement the "simple" parts.
-
-
Constructor Summary
Constructors Constructor Description AbstractUnimplementedQueue()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanadd(T t)booleanaddAll(Collection<? extends T> c)booleancontains(Object o)booleancontainsAll(Collection<?> c)Telement()Iterator<T>iterator()booleanoffer(T t)booleanoffer(T t, T t1)Tpeek()Tpoll()Tremove()booleanremove(Object o)booleanremoveAll(Collection<?> c)booleanretainAll(Collection<?> c)intsize()Object[]toArray()<T1> T1[]toArray(T1[] a)-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface java.util.Collection
clear, equals, hashCode, isEmpty, parallelStream, removeIf, spliterator, stream, toArray
-
-
-
-
Method Detail
-
contains
public boolean contains(Object o)
- Specified by:
containsin interfaceCollection<T>
-
toArray
public Object[] toArray()
- Specified by:
toArrayin interfaceCollection<T>
-
toArray
public <T1> T1[] toArray(T1[] a)
- Specified by:
toArrayin interfaceCollection<T>
-
add
public boolean add(T t)
-
remove
public boolean remove(Object o)
- Specified by:
removein interfaceCollection<T>
-
containsAll
public boolean containsAll(Collection<?> c)
- Specified by:
containsAllin interfaceCollection<T>
-
addAll
public boolean addAll(Collection<? extends T> c)
- Specified by:
addAllin interfaceCollection<T>
-
removeAll
public boolean removeAll(Collection<?> c)
- Specified by:
removeAllin interfaceCollection<T>
-
retainAll
public boolean retainAll(Collection<?> c)
- Specified by:
retainAllin interfaceCollection<T>
-
size
public int size()
- Specified by:
sizein interfaceCollection<T>
-
-