Пример #1
0
            public int CompareTo(PredicateDescr pd)
            {
                int result = Functor.CompareTo(pd.Functor);

                if (result == 0)
                {
                    return(Arity.CompareTo(pd.Arity));
                }

                return(result);
            }
Пример #2
0
        public int CompareTo(OtpErlangFun other)
        {
            if (other is null)
            {
                return(1);
            }
            int res = Pid.CompareTo(other.Pid);

            if (res == 0)
            {
                res = Module.CompareTo(other.Module);
            }
            if (res == 0)
            {
                res = Arity.CompareTo(other.Arity);
            }
            if (res == 0)
            {
                res = Md5.CompareTo(other.Md5);
            }
            if (res == 0)
            {
                res = Index.CompareTo(other.Index);
            }
            if (res == 0)
            {
                res = OldIndex.CompareTo(other.OldIndex);
            }
            if (res == 0)
            {
                res = Uniq.CompareTo(other.Uniq);
            }
            if (res == 0)
            {
                res = FreeVars.CompareTo(other.FreeVars);
            }
            return(res);
        }