Antlr4.Runtime.Misc.IntervalSet.Complement C# (CSharp) Method

Complement() public method

public Complement ( IIntSet vocabulary ) : Antlr4.Runtime.Misc.IntervalSet
vocabulary IIntSet
return Antlr4.Runtime.Misc.IntervalSet
        public virtual Antlr4.Runtime.Misc.IntervalSet Complement(IIntSet vocabulary)
        {
            if (vocabulary == null || vocabulary.IsNil)
            {
                return null;
            }
            // nothing in common with null set
            Antlr4.Runtime.Misc.IntervalSet vocabularyIS;
            if (vocabulary is Antlr4.Runtime.Misc.IntervalSet)
            {
                vocabularyIS = (Antlr4.Runtime.Misc.IntervalSet)vocabulary;
            }
            else
            {
                vocabularyIS = new Antlr4.Runtime.Misc.IntervalSet();
                vocabularyIS.AddAll(vocabulary);
            }
            return vocabularyIS.Subtract(this);
        }

Same methods

IntervalSet::Complement ( int minElement, int maxElement ) : Antlr4.Runtime.Misc.IntervalSet