Java Utililty Methods LinkedBlockingQueue

List of utility methods to do LinkedBlockingQueue

  1. HOME
  2. Java
  3. L
  4. LinkedBlockingQueue

Description

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

Method

BlockingQueue createLinkedBlockingQueue(Collection collection)
create Linked Blocking Queue
if (collection == null) {
 return new LinkedBlockingQueue<E>();
return new LinkedBlockingQueue<E>(collection);
Collection getCollection(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>();
...
Collection getCollection(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>();
...
LinkedBlockingQueue newLinkedBlockingQeque(int capacity)
new Linked Blocking Qeque
return new LinkedBlockingQueue<E>(capacity);
LinkedBlockingQueue newLinkedBlockingQueue(final Collection c)
new Linked Blocking Queue
return new LinkedBlockingQueue<E>(c);

AltStyle によって変換されたページ (->オリジナル) /