Type Set

All Supertypes:
Collection

Predefined type Set
extends Collection

The Set is the mathematical set. It contains unordered elements without duplicates.


Operation Summary
 Boolean =(Set rhs)
          True if this set and rhs contain the same elements.
 Boolean <>(Set rhs)
          True if this set and rhs do not contain the same elements.
 Set -(Set rhs)
          The elements of this set which are not in rhs.
 Bag asBag
          A bag that contains all the elements from this set.
 Sequence asSequence
          A sequence that contains all the elements from this set.
 Set collect(OclAny_Expression expr)
          The Bag of elements which results from applying the expr expression to every member of this set.
 Integer count(OclAny object)
          0 if object does not exist in this set, 1 otherwise.
 Set excluding(OclAny object)
          The set containing all elements of this set without object.
 Set including(OclAny object)
          The set containing all elements of this set plus object.
 Set intersection(Bag rhs)
          The intersection of this set and rhs (i.e., the set of all elements that are both in this set and rhs).
 Set intersection(Set rhs)
          The intersection of this set and rhs (i.e., the set of all elements that are both in this set and rhs).
 Set reject(Boolean_Expression expr)
          The subset of all elements for which applying the expr expression evaluates to false.
 Set select(Boolean_Expression expr)
          The subset of all elements for which applying the expr expression evaluates to true.
 Set symmetricDifference(Set rhs)
          The set containing all elements that are in this set or rhs, but not in both.
 Bag union(Bag rhs)
          The union of this set and rhs.
 Set union(Set rhs)
          The union of this set and rhs.
 
Operations inherited from type Collection
excludes, excludesAll, exists, forAll, getOne, includes, includesAll, isEmpty, isUnique, notEmpty, size, sortedBy, sortedBy, sum
 

Operations Detail

union

 public Set union(Set rhs)
The union of this set and rhs.

union

 public Bag union(Bag rhs)
The union of this set and rhs.

=

 public Boolean =(Set rhs)
True if this set and rhs contain the same elements.

<>

 public Boolean <>(Set rhs)
True if this set and rhs do not contain the same elements.

intersection

 public Set intersection(Set rhs)
The intersection of this set and rhs (i.e., the set of all elements that are both in this set and rhs).

intersection

 public Set intersection(Bag rhs)
The intersection of this set and rhs (i.e., the set of all elements that are both in this set and rhs).

-

 public Set -(Set rhs)
The elements of this set which are not in rhs.

including

 public Set including(OclAny object)
The set containing all elements of this set plus object.

excluding

 public Set excluding(OclAny object)
The set containing all elements of this set without object.

symmetricDifference

 public Set symmetricDifference(Set rhs)
The set containing all elements that are in this set or rhs, but not in both.

select

 public Set select(Boolean_Expression expr)
The subset of all elements for which applying the expr expression evaluates to true.

reject

 public Set reject(Boolean_Expression expr)
The subset of all elements for which applying the expr expression evaluates to false.

collect

 public Set collect(OclAny_Expression expr)
The Bag of elements which results from applying the expr expression to every member of this set.

count

 public Integer count(OclAny object)
0 if object does not exist in this set, 1 otherwise.
Overloads:
count in type Collection

asSequence

 public Sequence asSequence
A sequence that contains all the elements from this set.

asBag

 public Bag asBag
A bag that contains all the elements from this set.


Copyright 1999-2002 ObjeXion Software SA. All rights reserved.