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.

`selectByKind(TT)(type : Metaclass(TT)) : Set(TT)`

`selectByType(TT)(type : Metaclass(TT)) : Set(TT)`

**Iterations**

`reject(i : T[?] | lambda : Lambda T() : Boolean) : Set(T)`

The subset of the source set for which body is
`false`

.

`select(i : T[?] | lambda : Lambda T() : Boolean) : Set(T)`

The subset of set for which expr is
`true`

.

`sortedBy(i : T[?] | lambda : 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).