T - the type of objects held in this ConcurrentCollectionpublic interface ConcurrentCollection<T>
offerFirst(T),
offerLast(T), pollFirst(), and pollLast(). If the implementing sub-class delegates the above
methods to a Collection that does not have native implementation for offerFirst() or pollLast()
it can implement these methods in the same way as offerLast() or pollFirst(), and the vice versa.| Modifier and Type | Method and Description |
|---|---|
void |
offerFirst(T object)
Adds the given
object at the head of the ConcurrentCollection. |
void |
offerLast(T object)
Adds the given
object at the tail of the ConcurrentCollection. |
T |
pollFirst()
Polls an
object from the head of the ConcurrentCollection. |
T |
pollLast()
Polls an
object from the tail of the ConcurrentCollection. |
int |
size()
Returns the number of elements in this collection.
|
void offerFirst(T object)
object at the head of the ConcurrentCollection.object - the given objectvoid offerLast(T object)
object at the tail of the ConcurrentCollection.object - the given objectT pollFirst()
object from the head of the ConcurrentCollection.null otherwiseT pollLast()
object from the tail of the ConcurrentCollection.null otherwiseint size()
Copyright © 2013-2019 vibur.org. All Rights Reserved.