protected void updateRanges(Multiplicity owner, MultiplicityRange newRange) { List <object> ranges = owner.getRange(); ranges.Add(newRange); owner.setRange(ranges); }
protected override bool getSpecificIsMandatory() { Multiplicity multiplicity = getMultiplicity(); List <object> rangeCollection = multiplicity.getRange(); foreach (MultiplicityRange range in rangeCollection) { if (range.getLower() == 0) { return(false); } } return(true); }
protected bool getSpecificIsOneMultiplicity() { Multiplicity multiplicity = getMultiplicity(); List <object> rangeCollection = multiplicity.getRange(); foreach (MultiplicityRange range in rangeCollection) { if (range.getUpper() == 1 && rangeCollection.Count == 1) { return(true); } } return(false); }
protected override bool getSpecificIsOneMultiplicity() { Multiplicity multiplicity = getMultiplicity(); List <object> rangeCollection = multiplicity.getRange(); int index = 0; foreach (MultiplicityRange range in rangeCollection) { if (range.getUpper() == 1 && index != rangeCollection.Count - 1) { return(true); } index++; } return(false); }