T - type containedpublic class ConcurrentPriorityCollection<T extends Serializable> extends PriorityCollection<T>
ReadWriteLock| Constructor and Description |
|---|
ConcurrentPriorityCollection(ReadWriteLock readWriteLock,
PriorityCollectionSorting sorting)
Constructs a
ConcurrentPriorityCollection using the specified
ReadWriteLock |
| Modifier and Type | Method and Description |
|---|---|
void |
add(Iterable<T> c)
add the arguments and sort according to the PriorityCollectionSorting
value for the manager configuration
|
void |
add(T... c)
add the arguments and sort according to the PriorityCollectionSorting
value for the manager configuration
|
void |
clear()
remove all elements from the collection
|
PriorityCollection<T> |
getByMIMEType(String mimeType)
Returns the first item matching the mime type
NOTE: The order in which the services are loaded an examined is not deterministic so this method may return different results if the MIME-Type matches more than one item. |
boolean |
isEmpty() |
Iterator<T> |
iterator() |
void |
remove(T... c)
remove the arguments
|
void |
set(Iterable<T> c) |
void |
set(T... c)
Remove all elements, replace with the arguments and sort according to
priority
|
int |
size() |
String |
toString() |
setequals, getClass, hashCode, notify, notifyAll, wait, wait, waitforEach, spliteratorpublic ConcurrentPriorityCollection(@Nonnull ReadWriteLock readWriteLock, PriorityCollectionSorting sorting)
ConcurrentPriorityCollection using the specified
ReadWriteLockreadWriteLock - The ReadWriteLock that should
be used for locking.public boolean isEmpty()
isEmpty in class PriorityCollection<T extends Serializable>public int size()
size in class PriorityCollection<T extends Serializable>public void set(Iterable<T> c)
set in class PriorityCollection<T extends Serializable>c - collection of elements to set. Existing elements will be removed,
and the priority collection will be sorted according to the
PriorityCollectionSorting value for the manager configuration.public void add(Iterable<T> c)
PriorityCollectionadd in class PriorityCollection<T extends Serializable>c - list of elements to addpublic void set(T... c)
PriorityCollectionset in class PriorityCollection<T extends Serializable>c - list of elements to setpublic void add(T... c)
PriorityCollectionadd in class PriorityCollection<T extends Serializable>c - list of elements to addpublic void remove(T... c)
PriorityCollectionremove in class PriorityCollection<T extends Serializable>c - list of elements to removepublic void clear()
PriorityCollectionclear in class PriorityCollection<T extends Serializable>public Iterator<T> iterator()
iterator in interface Iterable<T extends Serializable>iterator in class PriorityCollection<T extends Serializable>public PriorityCollection<T> getByMIMEType(@Nonnull String mimeType)
PriorityCollectiongetByMIMEType in class PriorityCollection<T extends Serializable>mimeType - A MIME type to use for choosing an itempublic String toString()
toString in class PriorityCollection<T extends Serializable>Copyright © 2016 The University of Manchester. All Rights Reserved.