Java org.apache.commons.collections15 Bag fields, constructors, methods, implement or subclass

Example usage for Java org.apache.commons.collections15 Bag fields, constructors, methods, implement or subclass

Introduction

In this page you can find the methods, fields and constructors for org.apache.commons.collections15 Bag.

The text is from its open source code.

Method

booleanadd(E object, int nCopies)
Adds nCopies copies of the specified object to the Bag.
booleanadd(E object)
(Violation) Adds one copy the specified object to the Bag.
voidclear()
Removes all of the elements from this collection (optional operation).
booleancontains(Object o)
Returns true if this collection contains the specified element.
intgetCount(E object)
Returns the number of occurrences (cardinality) of the given object currently in the bag.
booleanisEmpty()
Returns true if this collection contains no elements.
booleanremove(E object, int nCopies)
Removes nCopies copies of the specified object from the Bag.
intsize()
Returns the total number of items in the bag across all types.
SetuniqueSet()
Returns a Set of unique elements in the Bag.