Example #1
0
        /*
         * /// (non-Javadoc)
         * ///
         * /// @see java.lang.Object#equals(java.lang.Object)
         */

        public override bool Equals(Object obj)
        {
            //Note: NOT performance critical
            if (this == obj)
            {
                return(true);
            }
            if (obj == null)
            {
                return(false);
            }
            if (GetType() != obj.GetType())
            {
                return(false);
            }
            var other = (Fst)obj;

            if (!Arrays.AreEqual(Isyms, other.Isyms))
            {
                return(false);
            }
            if (!Arrays.AreEqual(Osyms, other.Osyms))
            {
                return(false);
            }
            if (Start == null)
            {
                if (other.Start != null)
                {
                    return(false);
                }
            }
            else if (!Start.Equals(other.Start))
            {
                return(false);
            }
            if (_states == null)
            {
                if (other._states != null)
                {
                    return(false);
                }
            }
            else if (!Arrays.AreEqual(_states, other._states))
            {
                return(false);
            }
            if (Semiring == null)
            {
                if (other.Semiring != null)
                {
                    return(false);
                }
            }
            else if (!Semiring.Equals(other.Semiring))
            {
                return(false);
            }
            return(true);
        }