コード例 #1
0
        protected void updateRanges(Multiplicity owner, MultiplicityRange newRange)
        {
            List <object> ranges = owner.getRange();

            ranges.Add(newRange);
            owner.setRange(ranges);
        }
コード例 #2
0
        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);
        }
コード例 #3
0
        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);
        }
コード例 #4
0
        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);
        }