: Public <<type>> Class
Created: 4/10/2008 12:15:51 PM
Modified: 6/27/2008 12:48:03 PM
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 Notes
«Type» Collection Class Generalization