: Public <<type>> Class
Created: 10-04-2008 12:15:51
Modified: 27-06-2008 12:48:03
Project:
Advanced:
A bag is a type of set where the elements have been assigned an individual count (a integral ordering).
Operation
Public
asSequence():Sequence<T>
Details:
Sequential
Notes: Rewrites the Bas as a sequence of elements, the order is not predetermined, and may vary from example to example. This is use to create a list interface to the set for iteration.
Public
asSet():Set<T>
Details:
Sequential
Notes: This operations strips the count from the element role, and returns a set of "T" without duplicates.
Public
collect( expr: OCL,
):Bag<expr.type>
Details:
Sequential
Notes: This operation takes an OCL query (Boolean) and finds all elements that satisfies that query.
Public
excluding( object: T,
):Bag<T>
Details:
Sequential
Public
including( object: T,
):Bag<T>
Details:
Sequential
Public
reject( expr: OCL,
):Bag<expr.type>
Details:
Sequential
Public
select( expr: OCL,
):Bag<expr.type>
Details:
Sequential
Public
union( other: Bag<T>,
):Bag<T>
Details:
Sequential
Public
union( other: Set<T>,
):Bag<T>
Details:
Sequential
Notes: This union increments the count for each element in the set that is in the bag (from 0 to 1 for elements not in the bag).
Element Source Role Target Role
«parameter» T
Class  
Name: element
 
Name:  
 
Details:
 
Tag Value
persistence persistent
Details:
 
Object Type Connection Direction Notes
«type» Collection Class Generalization To