com.senn.magic.collections
Class ChainablePriorityQueue<E>

java.lang.Object
  extended by java.util.AbstractCollection<E>
      extended by java.util.AbstractQueue<E>
          extended by java.util.PriorityQueue<E>
              extended by com.senn.magic.collections.ChainablePriorityQueue<E>
All Implemented Interfaces:
ChainableQueue<E>, Serializable, Iterable<E>, Collection<E>, Queue<E>

public class ChainablePriorityQueue<E>
extends PriorityQueue<E>
implements ChainableQueue<E>

PriorityQueue implementation of ChainableQueue

Since:
3.5
Author:
Bart Thierens
Last modification: 23/01/2011
See Also:
Serialized Form

Constructor Summary
ChainablePriorityQueue()
           
ChainablePriorityQueue(Collection<? extends E> c)
           
ChainablePriorityQueue(int initialCapacity)
           
ChainablePriorityQueue(int initialCapacity, Comparator<? super E> comparator)
           
ChainablePriorityQueue(PriorityQueue<? extends E> p)
           
ChainablePriorityQueue(SortedSet<? extends E> s)
           
 
Method Summary
 ChainableQueue<E> delete(Object o)
           
 ChainableQueue<E> deleteAll(Collection<?> c)
           
 ChainableQueue<E> empty()
           
 ChainableQueue<E> keepAll(Collection<?> c)
           
 ChainableQueue<E> put(E e)
           
 ChainableQueue<E> putAll(Collection<? extends E> c)
           
 ChainableQueue<E> set(E e)
           
 
Methods inherited from class java.util.PriorityQueue
add, clear, comparator, contains, iterator, offer, peek, poll, remove, size, toArray, toArray
 
Methods inherited from class java.util.AbstractQueue
addAll, element, remove
 
Methods inherited from class java.util.AbstractCollection
containsAll, isEmpty, removeAll, retainAll, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface com.senn.magic.collections.ChainableQueue
add, addAll, clear, offer, remove, removeAll, retainAll
 
Methods inherited from interface java.util.Queue
element, peek, poll, remove
 
Methods inherited from interface java.util.Collection
contains, containsAll, equals, hashCode, isEmpty, iterator, size, toArray, toArray
 

Constructor Detail

ChainablePriorityQueue

public ChainablePriorityQueue()

ChainablePriorityQueue

public ChainablePriorityQueue(Collection<? extends E> c)

ChainablePriorityQueue

public ChainablePriorityQueue(int initialCapacity)

ChainablePriorityQueue

public ChainablePriorityQueue(PriorityQueue<? extends E> p)

ChainablePriorityQueue

public ChainablePriorityQueue(int initialCapacity,
                              Comparator<? super E> comparator)

ChainablePriorityQueue

public ChainablePriorityQueue(SortedSet<? extends E> s)
Method Detail

delete

public ChainableQueue<E> delete(Object o)
Specified by:
delete in interface ChainableQueue<E>
Returns:
See Also:
Collection.remove(Object)

deleteAll

public ChainableQueue<E> deleteAll(Collection<?> c)
Specified by:
deleteAll in interface ChainableQueue<E>
Returns:
See Also:
Collection.removeAll(Collection)

empty

public ChainableQueue<E> empty()
Specified by:
empty in interface ChainableQueue<E>
Returns:
See Also:
Collection.clear()

keepAll

public ChainableQueue<E> keepAll(Collection<?> c)
Specified by:
keepAll in interface ChainableQueue<E>
Returns:
See Also:
Collection.retainAll(Collection)

put

public ChainableQueue<E> put(E e)
Specified by:
put in interface ChainableQueue<E>
Returns:
See Also:
Queue.add(Object)

putAll

public ChainableQueue<E> putAll(Collection<? extends E> c)
Specified by:
putAll in interface ChainableQueue<E>
Returns:
See Also:
Collection.addAll(Collection)

set

public ChainableQueue<E> set(E e)
Specified by:
set in interface ChainableQueue<E>
Returns:
See Also:
Queue.offer(Object)