Top Description Methods
org.pcollections

public Interface PCollection<E>

extends Collection<E>
Known Direct Subinterfaces
org.pcollections.PQueue, org.pcollections.PSequence, org.pcollections.PSet, org.pcollections.PBag
Imports
java.util.Collection

An immutable, persistent collection of elements of type E.
Author
harold

Method Summary

Modifier and TypeMethod and Description
public boolean
add(E
element whose presence in this collection is to be ensured
o
)

Redeclares java.util.Collection.add.

Deprecated

Ensures that this collection contains the specified element (optional operation).

public boolean
addAll(Collection<? extends E>
collection containing elements to be added to this collection
c
)

Redeclares java.util.Collection.addAll.

Deprecated

Adds all of the elements in the specified collection to this collection (optional operation).

public void
clear()

Redeclares java.util.Collection.clear.

Deprecated

Removes all of the elements from this collection (optional operation).

public PCollection<E>

Returns:

this with a single instance of e removed, if e is in this
minus
(Object e)

public PCollection<E>

Returns:

this with all elements of list completely removed
minusAll
(Collection<?> list)

public PCollection<E>

Returns:

a collection which contains e and all of the elements of this
plus
(E e)

public PCollection<E>

Returns:

a collection which contains all of the elements of list and this
plusAll
(Collection<? extends E> list)

public boolean
remove(Object
element to be removed from this collection, if present
o
)

Redeclares java.util.Collection.remove.

Deprecated

Removes a single instance of the specified element from this collection, if it is present (optional operation).

public boolean
removeAll(Collection<?>
collection containing elements to be removed from this collection
c
)

Redeclares java.util.Collection.removeAll.

Deprecated

Removes all of this collection's elements that are also contained in the specified collection (optional operation).

public boolean
retainAll(Collection<?>
collection containing elements to be retained in this collection
c
)

Redeclares java.util.Collection.retainAll.

Deprecated

Retains only the elements in this collection that are contained in the specified collection (optional operation).

Inherited from java.util.Collection:
containscontainsAllequalshashCodeisEmptyiteratorparallelStreamremoveIfsizespliteratorstreamtoArraytoArraytoArray

Method Detail

addback to summary
public boolean add(E o)

Redeclares java.util.Collection.add.

Doc from java.util.Collection.add.

Deprecated

Ensures that this collection contains the specified element (optional operation). Returns true if this collection changed as a result of the call. (Returns false if this collection does not permit duplicates and already contains the specified element.)

Collections that support this operation may place limitations on what elements may be added to this collection. In particular, some collections will refuse to add null elements, and others will impose restrictions on the type of elements that may be added. Collection classes should clearly specify in their documentation any restrictions on what elements may be added.

If a collection refuses to add a particular element for any reason other than that it already contains the element, it must throw an exception (rather than returning false). This preserves the invariant that a collection always contains the specified element after this call returns.

Parameters
o:E

element whose presence in this collection is to be ensured

Returns:boolean

true if this collection changed as a result of the call

Annotations
@Deprecated
addAllback to summary
public boolean addAll(Collection<? extends E> c)

Redeclares java.util.Collection.addAll.

Doc from java.util.Collection.addAll.

Deprecated

Adds all of the elements in the specified collection to this collection (optional operation). The behavior of this operation is undefined if the specified collection is modified while the operation is in progress. (This implies that the behavior of this call is undefined if the specified collection is this collection, and this collection is nonempty.) If the specified collection has a defined encounter order, processing of its elements generally occurs in that order.

Parameters
c:Collection<? extends E>

collection containing elements to be added to this collection

Returns:boolean

true if this collection changed as a result of the call

Annotations
@Deprecated
clearback to summary
public void clear()

Redeclares java.util.Collection.clear.

Doc from java.util.Collection.clear.

Deprecated

Removes all of the elements from this collection (optional operation). The collection will be empty after this method returns.

Annotations
@Deprecated
minusback to summary
public PCollection<E> minus(Object e)
Returns:PCollection<E>

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

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

this with all elements of list completely removed

plusback to summary
public PCollection<E> plus(E e)
Returns:PCollection<E>

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

plusAllback to summary
public PCollection<E> plusAll(Collection<? extends E> list)
Returns:PCollection<E>

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

removeback to summary
public boolean remove(Object o)

Redeclares java.util.Collection.remove.

Doc from java.util.Collection.remove.

Deprecated

Removes a single instance of the specified element from this collection, if it is present (optional operation). More formally, removes an element e such that Objects.equals(o, e), if this collection contains one or more such elements. Returns true if this collection contained the specified element (or equivalently, if this collection changed as a result of the call).

Parameters
o:Object

element to be removed from this collection, if present

Returns:boolean

true if an element was removed as a result of this call

Annotations
@Deprecated
removeAllback to summary
public boolean removeAll(Collection<?> c)

Redeclares java.util.Collection.removeAll.

Doc from java.util.Collection.removeAll.

Deprecated

Removes all of this collection's elements that are also contained in the specified collection (optional operation). After this call returns, this collection will contain no elements in common with the specified collection.

Parameters
c:Collection<?>

collection containing elements to be removed from this collection

Returns:boolean

true if this collection changed as a result of the call

Annotations
@Deprecated
retainAllback to summary
public boolean retainAll(Collection<?> c)

Redeclares java.util.Collection.retainAll.

Doc from java.util.Collection.retainAll.

Deprecated

Retains only the elements in this collection that are contained in the specified collection (optional operation). In other words, removes from this collection all of its elements that are not contained in the specified collection.

Parameters
c:Collection<?>

collection containing elements to be retained in this collection

Returns:boolean

true if this collection changed as a result of the call

Annotations
@Deprecated