List of utility methods to do LinkedBlockingQueue
BlockingQueue | createLinkedBlockingQueue(Collection extends E> 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 extends E> c) new Linked Blocking Queue return new LinkedBlockingQueue<E>(c); |