Top Description Methods
org.pcollections

public Interface PQueue<E>

extends PCollection<E>, Queue<E>
Known Direct Implementers
org.pcollections.AmortizedPQueue
Imports
java.util.Collection, .Queue

A persistent queue.
Author
mtklein

Method Summary

Modifier and TypeMethod and Description
public PQueue<E>
public PCollection<E>
public PCollection<E>
public boolean
offer(E
the element to add
o
)

Redeclares java.util.Queue.offer.

Deprecated

Inserts the specified element into this queue if it is possible to do so immediately without violating capacity restrictions.

public PQueue<E>
public PQueue<E>
public E
poll()

Redeclares java.util.Queue.poll.

Deprecated

Retrieves and removes the head of this queue, or returns null if this queue is empty.

public E
remove()

Redeclares java.util.Queue.remove.

Deprecated

Retrieves and removes the head of this queue.

Inherited from java.util.Queue:
addelementpeek
Inherited from org.pcollections.PCollection:
addaddAllclearremoveremoveAllretainAll

Method Detail

minusback to summary
public PQueue<E> minus()
minusback to summary
public PCollection<E> minus(Object e)

Redeclares org.pcollections.PCollection.minus.

Returns:PCollection<E>

Doc from org.pcollections.PCollection.minus.

this with a single instance of e removed, if e is in this

minusAllback to summary
public PCollection<E> minusAll(Collection<?> list)

Redeclares org.pcollections.PCollection.minusAll.

Returns:PCollection<E>

Doc from org.pcollections.PCollection.minusAll.

this with all elements of list completely removed

offerback to summary
public boolean offer(E o)

Redeclares java.util.Queue.offer.

Doc from java.util.Queue.offer.

Deprecated

Inserts the specified element into this queue if it is possible to do so immediately without violating capacity restrictions. When using a capacity-restricted queue, this method is generally preferable to add, which can fail to insert an element only by throwing an exception.

Parameters
o:E

the element to add

Returns:boolean

true if the element was added to this queue, else false

Annotations
@Deprecated
plusback to summary
public PQueue<E> plus(E e)

Redeclares org.pcollections.PCollection.plus.

Returns:PQueue<E>

Doc from org.pcollections.PCollection.plus.

a collection which contains e and all of the elements of this

plusAllback to summary
public PQueue<E> plusAll(Collection<? extends E> list)

Redeclares org.pcollections.PCollection.plusAll.

Returns:PQueue<E>

Doc from org.pcollections.PCollection.plusAll.

a collection which contains all of the elements of list and this

pollback to summary
public E poll()

Redeclares java.util.Queue.poll.

Doc from java.util.Queue.poll.

Deprecated

Retrieves and removes the head of this queue, or returns null if this queue is empty.

Returns:E

the head of this queue, or null if this queue is empty

Annotations
@Deprecated
removeback to summary
public E remove()

Redeclares java.util.Queue.remove.

Doc from java.util.Queue.remove.

Deprecated

Retrieves and removes the head of this queue. This method differs from poll() only in that it throws an exception if this queue is empty.

Returns:E

the head of this queue

Annotations
@Deprecated