conformsTo
Bag(T)
,
UniqueCollection(T)
Operations
=(object2 : OclSelf) : Boolean
precedence:
EQUALITY
Evaluates to
true if
self and s contain the same elements.
<>(object2 : OclSelf) : Boolean
precedence:
EQUALITY
-(s : UniqueCollection(OclAny)) : Set(T)
precedence:
ADDITIVE
The elements of
self, which are not in s.
excluding(object : OclAny) : Set(T)
The set containing all elements of
self without object.
flatten(T2)() : Set(T2)
Redefines the Collection operation. If the element type is not a collection type, this results in the same set as
self.
If the element type is a collection type, the result is the set containing all the elements of all the recursively flattened elements of
self.
including(object : T) : Set(T)
The set containing all elements of
self plus object.
intersection(s : Collection(T)) : Set(T)
The intersection of
self and s (i.e., the set of all elements that are in both
self and s).
selectByKind(TT)(type : AnyClassifier(TT)) : Set(TT)
selectByType(TT)(type : AnyClassifier(TT)) : Set(TT)
union(s : Collection(T)) : Set(T)
The set consisting of all elements in
self and all elements in s.
Iterations
reject(i : T | body : Lambda T() : Boolean) : Set(T)
The subset of the source set for which body is
false.
select(i : T | body : Lambda T() : Boolean) : Set(T)
The subset of set for which expr is
true.
sortedBy(i : T | body : Lambda T() : OclAny) : OrderedSet(T)
Results in the ordered set containing all elements of the source collection. The element for which body has the lowest value comes first, and so on. The type of the body expression must have the < operation defined. The < operation must return a Boolean value and must be transitive (i.e., if a < b and b < c, then a < c).