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>
Type Parameters:
T - the generic type
C - the generic type
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>

The Class HoldQueue.

Author:
Mark Bednarczyk, Sly Technologies, Inc.

Nested Class Summary
static class HoldQueue.HoldHandle<C>
          The Class HoldHandle.
 
Constructor Summary
protected HoldQueue(java.util.Queue<T> hidden, java.util.Queue<T> exposed, java.util.Comparator<T> comparator)
          Instantiates a new hold queue.
 
Method Summary
 java.util.Iterator<T> iterator()
          Iterator.
 boolean offer(T o)
          Offer.
 T peek()
          Peek.
 T poll()
          Poll.
 int size()
          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
add, element, remove
 
Methods inherited from interface java.util.Collection
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)
Instantiates a new hold queue.

Parameters:
hidden - the hidden
exposed - the exposed
comparator - the comparator
Method Detail

iterator

public java.util.Iterator<T> iterator()
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>
Returns:
the iterator
See Also:
AbstractCollection.iterator()

size

public int size()
Size.

Specified by:
size in interface java.util.Collection<T>
Specified by:
size in class java.util.AbstractCollection<T>
Returns:
the int
See Also:
AbstractCollection.size()

offer

public boolean offer(T o)
Offer.

Specified by:
offer in interface java.util.Queue<T>
Parameters:
o - the o
Returns:
true, if successful
See Also:
Queue.offer(java.lang.Object)

peek

public T peek()
Peek.

Specified by:
peek in interface java.util.Queue<T>
Returns:
the t
See Also:
Queue.peek()

poll

public T poll()
Poll.

Specified by:
poll in interface java.util.Queue<T>
Returns:
the t
See Also:
Queue.poll()