Antlr4.Runtime.Atn.LexerActionExecutor.Equals C# (CSharp) Method

Equals() public method

public Equals ( object obj ) : bool
obj object
return bool
        public override bool Equals(object obj)
        {
            if (obj == this)
            {
                return true;
            }
            else
            {
                if (!(obj is Antlr4.Runtime.Atn.LexerActionExecutor))
                {
                    return false;
                }
            }
            Antlr4.Runtime.Atn.LexerActionExecutor other = (Antlr4.Runtime.Atn.LexerActionExecutor)obj;
            return hashCode == other.hashCode && Arrays.Equals(lexerActions, other.lexerActions);
        }
    }

Usage Example

Example #1
0
        public override bool Equals(ATNConfig other)
        {
            if (this == other)
            {
                return(true);
            }
            else if (!(other is LexerATNConfig))
            {
                return(false);
            }

            LexerATNConfig lexerOther = (LexerATNConfig)other;

            if (passedThroughNonGreedyDecision != lexerOther.passedThroughNonGreedyDecision)
            {
                return(false);
            }

            if (!(lexerActionExecutor == null ? lexerOther.lexerActionExecutor == null : lexerActionExecutor.Equals(lexerOther.lexerActionExecutor)))
            {
                return(false);
            }

            return(base.Equals(other));
        }