Erlang.NET.OtpErlangTuple.Equals C# (CSharp) Method

Equals() public method

public Equals ( Object o ) : bool
o Object
return bool
        public override bool Equals(Object o)
        {
            if (!(o is OtpErlangTuple))
            {
                return false;
            }

            OtpErlangTuple t = (OtpErlangTuple)o;
            int a = arity();

            if (a != t.arity())
            {
                return false;
            }

            for (int i = 0; i < a; i++)
            {
                if (!elems[i].Equals(t.elems[i]))
                {
                    return false; // early exit
                }
            }

            return true;
        }