Java Utililty Methods LinkedBlockingQueue

List of utility methods to do LinkedBlockingQueue

Description

The list of methods to do LinkedBlockingQueue are organized into topic(s).

Method

BlockingQueuecreateLinkedBlockingQueue(Collection collection)
create Linked Blocking Queue
if (collection == null) {
    return new LinkedBlockingQueue<E>();
return new LinkedBlockingQueue<E>(collection);
CollectiongetCollection(Class collectionType)
Given any of the known collection types, this method will return an instance of the collection.
if (HashSet.class.equals(collectionType)) {
    return new HashSet<Object>();
} else if (TreeSet.class.equals(collectionType)) {
    return new TreeSet<Object>();
} else if (CopyOnWriteArraySet.class.equals(collectionType)) {
    return new CopyOnWriteArraySet<Object>();
} else if (LinkedHashSet.class.equals(collectionType)) {
    return new LinkedHashSet<Object>();
...
CollectiongetCollection(Class propertyType)
get Collection
if (!Collection.class.isAssignableFrom(propertyType)) {
    throw new Error("Expected property to be a collection while it was " + propertyType.getCanonicalName());
if (Set.class.isAssignableFrom(propertyType)) {
    if (TreeSet.class.isAssignableFrom(propertyType)) {
        return new TreeSet<Object>();
    } else if (ConcurrentSkipListSet.class.isAssignableFrom(propertyType)) {
        return new ConcurrentSkipListSet<Object>();
...
LinkedBlockingQueuenewLinkedBlockingQeque(int capacity)
new Linked Blocking Qeque
return new LinkedBlockingQueue<E>(capacity);
LinkedBlockingQueuenewLinkedBlockingQueue(final Collection c)
new Linked Blocking Queue
return new LinkedBlockingQueue<E>(c);