Top Description Fields Constructors Methods
org.pcollections

public final Class HashTreePBag

extends Object
Class Inheritance
Imports
java.util.Collection

A static convenience class for creating efficient persistent bags.

This class simply creates MapPBags backed by HashTreePMaps.

Author
harold

Field Summary

Modifier and TypeField and Description
private static final MapPBag<Object>

Constructor Summary

AccessConstructor and Description
private

Method Summary

Modifier and TypeMethod and Description
public static <E> MapPBag<E>

Returns:

an empty bag
empty
()

public static <E> MapPBag<E>

Returns:

empty().plusAll(map)
from
(final Collection<? extends E> list)

public static <E> MapPBag<E>

Returns:

empty().plus(e)
singleton
(final E e)

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

EMPTYback to summary
private static final MapPBag<Object> EMPTY

Constructor Detail

HashTreePBagback to summary
private HashTreePBag()

Method Detail

emptyback to summary
public static <E> MapPBag<E> empty()
Returns:MapPBag<E>

an empty bag

Annotations
@SuppressWarnings:unchecked
fromback to summary
public static <E> MapPBag<E> from(final Collection<? extends E> list)
Returns:MapPBag<E>

empty().plusAll(map)

singletonback to summary
public static <E> MapPBag<E> singleton(final E e)
Returns:MapPBag<E>

empty().plus(e)