|
||||||||||
PREV NEXT | FRAMES NO FRAMES |
Packages that use Bag | |
---|---|
jaggregate | Jaggregate is a J2SE 5.0-aware collections library that is modeled after the ANSI Smalltalk collection protocols. |
Uses of Bag in jaggregate |
---|
Methods in jaggregate that return Bag | ||
---|---|---|
static
|
Bag.bagFrom(Collection<? extends T> elements)
Creates a bag containing the elements in the given collection. |
|
static
|
Bag.bagFrom(Iterable<? extends T> elements)
Creates a bag containing the elements given by an iterable object. |
|
static
|
Bag.bagFrom(T[] elements)
Creates a bag containing the elements in the given array. |
|
static
|
Bag.bagWith(T newElement,
T... restOfNewElements)
Creates a bag containing the given elements. |
|
|
Bag.collect(UnaryFunctor<? super E,? extends R> transformer)
Evaluates the given transformer for each element of this collection, with the element as the parameter, and answers a new collection containing the results of these evaluations. The elements are traversed in the order specified by forEachDo for this collection.
Unless specifically refined, this message is defined to answer an object
conforming to the same protocol as this collection. |
|
|
Dictionary.collect(UnaryFunctor<? super Pair<K,V>,? extends R> transformer)
Evaluates the given transformer for each element of this collection, with the element as the parameter, and answers a new collection containing the results of these evaluations. The elements are traversed in the order specified by forEachDo for this collection.
Unless specifically refined, this message is defined to answer an object
conforming to the same protocol as this collection. |
|
static
|
Bag.emptyBag()
Creates an empty bag. |
|
Bag<E> |
Bag.reject(UnaryCondition<? super E> discriminator)
Answers a new collection which contains only the elements in this collection which cause the given discriminator to answer false .
For each element of this collection, discriminator is evaluated with the
element as the parameter. Each element which causes discriminator to
answer false is included in the new collection.
The elements are traversed in the order specified by forEachDo for this collection.
Unless specifically refined, this message is defined to answer an object
conforming to the same protocol as this collection. If both this collection
and the result maintain an ordering of their elements, the elements of the
result will be in the same relative order as the elements of this collection. |
|
Bag<E> |
Bag.select(UnaryCondition<? super E> discriminator)
Answers a new collection which contains only the elements in this collection which cause the given discriminator to answer true .
For each element of this collection, discriminator is evaluated with the
element as the parameter. Each element which causes discriminator to
answer true is included in the new collection.
The elements are traversed in order specified by forEachDo for this collection.
Unless specifically refined, this message is defined to answer an object
conforming to the same protocol as this collection. If both this collection
and the result maintain an ordering of their elements, the elements of the
result will be in the same relative order as the elements of this collection. |
|
Bag<E> |
Collection.toBag()
Answers a bag with the same elements as this collection. |
|
Bag<E> |
Bag.toBag()
Answers a bag with the same elements as this collection. Answers self. |
|
Bag<E> |
AbstractCollection.toBag()
Answers a bag with the same elements as this collection. |
|
||||||||||
PREV NEXT | FRAMES NO FRAMES |