Top Description Fields Constructors Methods
org.eclipse.collections.impl.factory

public final Class Bags

extends Object
Class Inheritance
Annotations
@SuppressWarnings:ConstantNamingConvention
Imports
org.eclipse.collections.api.factory.bag.ImmutableBagFactory, .MultiReaderBagFactory, .MutableBagFactory, org.eclipse.collections.impl.bag.immutable.ImmutableBagFactoryImpl, org.eclipse.collections.impl.bag.mutable.MultiReaderMutableBagFactory, .MutableBagFactoryImpl

This class should be used to create instances of MutableBag and ImmutableBag

Mutable Examples:

MutableBag<String> emptyBag = Bags.mutable.empty();
MutableBag<String> bagWith = Bags.mutable.with("a", "b", "c");
MutableBag<String> bagOf = Bags.mutable.of("a", "b", "c");
Immutable Examples:
ImmutableBag<String> emptyBag = Bags.immutable.empty();
ImmutableBag<String> bagWith = Bags.immutable.with("a", "b", "c");
ImmutableBag<String> bagOf = Bags.immutable.of("a", "b", "c");

Field Summary

Modifier and TypeField and Description
public static final ImmutableBagFactory
public static final MultiReaderBagFactory
public static final MutableBagFactory

Constructor Summary

AccessConstructor and Description
private
Bags()

Method Summary

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

immutableback to summary
public static final ImmutableBagFactory immutable
multiReaderback to summary
public static final MultiReaderBagFactory multiReader
mutableback to summary
public static final MutableBagFactory mutable

Constructor Detail

Bagsback to summary
private Bags()