Package rx.internal.util
Class SynchronizedQueue<T>
java.lang.Object
rx.internal.util.SynchronizedQueue<T>
- Type Parameters:
T-
- All Implemented Interfaces:
Cloneable,Iterable<T>,Collection<T>,Queue<T>
Intended for use when the `sun.misc.Unsafe` implementations can't be used.
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanbooleanaddAll(Collection<? extends T> c) voidclear()clone()booleanbooleancontainsAll(Collection<?> c) element()booleaninthashCode()booleanisEmpty()iterator()booleanpeek()poll()remove()booleanbooleanremoveAll(Collection<?> c) booleanretainAll(Collection<?> c) intsize()Object[]toArray()<R> R[]toArray(R[] a) toString()Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface java.util.Collection
parallelStream, removeIf, spliterator, stream, toArray
-
Field Details
-
list
-
size
private final int size
-
-
Constructor Details
-
SynchronizedQueue
public SynchronizedQueue() -
SynchronizedQueue
public SynchronizedQueue(int size)
-
-
Method Details
-
isEmpty
public boolean isEmpty()- Specified by:
isEmptyin interfaceCollection<T>
-
contains
- Specified by:
containsin interfaceCollection<T>
-
iterator
-
size
public int size()- Specified by:
sizein interfaceCollection<T>
-
add
-
remove
- Specified by:
removein interfaceCollection<T>
-
containsAll
- Specified by:
containsAllin interfaceCollection<T>
-
addAll
- Specified by:
addAllin interfaceCollection<T>
-
removeAll
- Specified by:
removeAllin interfaceCollection<T>
-
retainAll
- Specified by:
retainAllin interfaceCollection<T>
-
clear
public void clear()- Specified by:
clearin interfaceCollection<T>
-
toString
-
hashCode
public int hashCode()- Specified by:
hashCodein interfaceCollection<T>- Overrides:
hashCodein classObject
-
equals
- Specified by:
equalsin interfaceCollection<T>- Overrides:
equalsin classObject
-
peek
-
element
-
poll
-
remove
-
offer
-
clone
-
toArray
- Specified by:
toArrayin interfaceCollection<T>
-
toArray
public <R> R[] toArray(R[] a) - Specified by:
toArrayin interfaceCollection<T>
-