They
also tend to promote a clear style, since they are read-only data structures. Aliased
updates can thus be avoided.
Invariant: All field values (returned by the FieldValues method) must have a
fixed order and contain elements of type IComparable that satisfy the predicate
IsAbstractValue(Object). All fields of subtypes of this class must be readonly.
This invariant holds for subtypes of CompoundValue such as the collection types
desribed below. The type parameter T for the collection types must support interface
IComparable.
A.2.2 Set
Set
An unordered collection of distinct values. This type is immutable and uses structural
equality. Add/remove operations return a new set.
294 Modeling Library Reference
Syntax
public sealed class Set : CollectionValue
Constructors
Set()
Constructs an empty set of type T. The static field Set.EmptySet should be
used instead of this constructor.
Set(IEnumerable)
Constructs a set containing all enumerated elements.
Set(T[])
Constructs a set from the elements given in the argument list.
Methods
The following entries describe some of the methods of this type. Many more are
described in the library documentation.
Add(T)
Returns a set with all of the elements of the current set, plus the value given as
an argument.
BigIntersect(Set>)
(Static method.) Distributed intersection.
Pages:
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382