Example usage for java.util.concurrent DelayQueue DelayQueue

List of usage examples for java.util.concurrent DelayQueue DelayQueue

Introduction

In this page you can find the example usage for java.util.concurrent DelayQueue DelayQueue.

Prototype

public DelayQueue(Collection<? extends E> c) 

Source Link

Document

Creates a DelayQueue initially containing the elements of the given collection of Delayed instances.

Usage

From source file:org.jiemamy.utils.collection.CollectionsUtil.java

/**
 * {@link DelayQueue}?????//from   w w w .ja  v  a2 s  .  c o m
 * 
 * @param <E> {@link CopyOnWriteArraySet}??
 * @param c 
 * @return {@link DelayQueue}???
 * @throws IllegalArgumentException ?{@code null}???
 * @see DelayQueue#DelayQueue(Collection)
 */
public static <E extends Delayed> DelayQueue<E> newDelayQueue(Collection<? extends E> c) {
    Validate.notNull(c);
    return new DelayQueue<E>(c);
}