public OclBag flattenToBag() { List <OclAny> list = new List <OclAny>(); FlattenToList(list, OclCollectionType.Depth(elementType)); return(new OclBag(OclCollectionType.BasicElementType(elementType), list)); }
public OclSequence flattenToSequence() { OclSequence seq = new OclSequence(OclCollectionType.BasicElementType(elementType)); FlattenToList(seq.list, OclCollectionType.Depth(elementType)); return(seq); }