: Public <<type>> Class
Created: 23.5.2022 18.05.04
Modified: 1.8.2022 13.54.02
Project:
Advanced:
A bag is a type of set where the elements have been assigned an individual count (a integral ordering). <br/>
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. <br/>
Public
asSet():Set<T>
Details:
Sequential
Notes: This operations strips the count from the element role, and returns a set of "T" without duplicates. <br/>
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.<br/>
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). <br/>
Element Source Role Target Role
«parameter» T
Class  
Name: element
 
Name:  
 
Details:
 
Tag Value
persistence persistent
Details:
 
Property Value
isFinalSpecialization: 0
Object Type Connection Direction Notes
«type» Collection Class Generalization To