List of usage examples for java.util.concurrent ArrayBlockingQueue contains
public boolean contains(Object o)
From source file:Main.java
public static void main(String[] argv) throws Exception { int capacity = 100; ArrayBlockingQueue<Integer> queue = new ArrayBlockingQueue<Integer>(capacity); for (int i = 0; i < 100; i++) { queue.add(i);/*from w w w . j a v a 2s . c om*/ } System.out.println(queue.contains(5)); queue.clear(); System.out.println(queue.contains(5)); }