org.jnetpcap.util
Class HoldQueue<T,C>

java.lang.Object
  extended by java.util.AbstractCollection<E>
      extended by java.util.AbstractQueue<T>
          extended by org.jnetpcap.util.HoldQueue<T,C>
All Implemented Interfaces:
java.lang.Iterable<T>, java.util.Collection<T>, java.util.Queue<T>

public class HoldQueue<T,C>
extends java.util.AbstractQueue<T>
implements java.util.Queue<T>

Author:
Mark Bednarczyk, Sly Technologies, Inc.

Nested Class Summary
static class HoldQueue.HoldHandle<C>
           
 
Constructor Summary
protected HoldQueue(java.util.Queue<T> hidden, java.util.Queue<T> exposed, java.util.Comparator<T> comparator)
           
 
Method Summary
 java.util.Iterator<T> iterator()
           
 boolean offer(T o)
           
 T peek()
           
 T poll()
           
 int size()
           
 
Methods inherited from class java.util.AbstractQueue
add, addAll, clear, element, remove
 
Methods inherited from class java.util.AbstractCollection
contains, containsAll, isEmpty, remove, removeAll, retainAll, toArray, toArray, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface java.util.Queue
element, remove
 
Methods inherited from interface java.util.Collection
add, addAll, clear, contains, containsAll, equals, hashCode, isEmpty, remove, removeAll, retainAll, toArray, toArray
 

Constructor Detail

HoldQueue

protected HoldQueue(java.util.Queue<T> hidden,
                    java.util.Queue<T> exposed,
                    java.util.Comparator<T> comparator)
Method Detail

iterator

public java.util.Iterator<T> iterator()
Specified by:
iterator in interface java.lang.Iterable<T>
Specified by:
iterator in interface java.util.Collection<T>
Specified by:
iterator in class java.util.AbstractCollection<T>

size

public int size()
Specified by:
size in interface java.util.Collection<T>
Specified by:
size in class java.util.AbstractCollection<T>

offer

public boolean offer(T o)
Specified by:
offer in interface java.util.Queue<T>

peek

public T peek()
Specified by:
peek in interface java.util.Queue<T>

poll

public T poll()
Specified by:
poll in interface java.util.Queue<T>