Set(T)

Represents a mathematical set. Duplicate elements are stored only once.

Operations

union(b: Bag(T)): Bag(T)
The union of self and b.
union(s: Set(T)): Set(T)
The union of self and s.
intersection(b: Bag(T)): Set(T)
The set of all elements contained in self and b.
intersection(s: Set(T)): Set(T)
The set of all elements contained in self and s.
-(s: Set(T)): Set(T)
The elements of self which are not in s.
symmetricDifference(s: Set(T)): Set(T)
A set containing all the elements that are in self or s, but not in both sets.
including(t: T): Set(T)
A set containing all elements of self and a.
excluding(t: T): Set(T)
A set containing all elements of self except from a.
select(e: OclExpression): Set(T)
The subset of self containing the elements for which e evaluates to true.
reject(e: OclExpression): Set(T)
The subset of self containing the elements for which e evaluates to false.
flatten(): T2
If the element Type is not a collection type, this results in the same set. Otherwise collection type, the result is a set containing all the elements of all the elements of self
collect(e: OclExpression): T2
Equivalent to s->collectNested(e1)->flatten().
collectNested(e: OclExpression): T2
The bag of elements resulting from applying e to every element in self. The element type of the bag is the type of the given expression.