AIMA.Core.Logic.FOL.KB.Data.Literal.GetHashCode C# (CSharp) Method

GetHashCode() public method

public GetHashCode ( ) : int
return int
        public override int GetHashCode()
        {
            if (0 == hashCode)
            {
                hashCode = 17;
                hashCode = 37 * hashCode + this.GetType().Name.GetHashCode()
                        + (isPositiveLiteral() ? "+".GetHashCode() : "-".GetHashCode())
                        + atom.getSymbolicName().GetHashCode();
                foreach (Term t in atom.getArgs())
                {
                    hashCode = 37 * hashCode + t.GetHashCode();
                }
            }
            return hashCode;
        }
    }