public OclSet intersection(OclSet set) { if (IsNull(set)) { throw new ArgumentNullException(); } //Use Set implementation return(set.intersection(this)); }
protected OclSet ClosureToSet <T>(OclClassifier newElementType, Func <T, OclAny> body) where T : OclAny { OclSet resultSet = new OclSet(newElementType); ClosureTo(newElementType, this, resultSet.set, body); return(resultSet); }
public OclBag union(OclClassifier newElementType, OclSet set) { if (IsNull(set)) { throw new ArgumentNullException(); } OclBag bg = new OclBag(newElementType, map); bg.AddRange(set); return(bg); }
public virtual OclSet product(OclCollection c2) { OclTupleType newElementType = OclTupleType.Tuple(OclTupleType.Part("first", elementType), OclTupleType.Part("second", c2.elementType)); OclSet set = new OclSet(newElementType); foreach (OclAny e1 in this) { foreach (OclAny e2 in c2) { set.set.Add(new OclTuple(newElementType, OclTuple.Part("first", e1), OclTuple.Part("second", e2))); } } return(set); }