Example #1
0
 public override bool Equals(object o)
 {
     if (this == o)
     {
         return(true);
     }
     if (!(o is Edu.Stanford.Nlp.Util.Triple))
     {
         return(false);
     }
     Edu.Stanford.Nlp.Util.Triple triple = (Edu.Stanford.Nlp.Util.Triple)o;
     if (first != null ? !first.Equals(triple.first) : triple.first != null)
     {
         return(false);
     }
     if (second != null ? !second.Equals(triple.second) : triple.second != null)
     {
         return(false);
     }
     if (third != null ? !third.Equals(triple.third) : triple.third != null)
     {
         return(false);
     }
     return(true);
 }
Example #2
0
        public virtual int CompareTo(Edu.Stanford.Nlp.Util.Triple <T1, T2, T3> another)
        {
            int comp = ((IComparable <T1>)First()).CompareTo(another.First());

            if (comp != 0)
            {
                return(comp);
            }
            else
            {
                comp = ((IComparable <T2>)Second()).CompareTo(another.Second());
                if (comp != 0)
                {
                    return(comp);
                }
                else
                {
                    return(((IComparable <T3>)Third()).CompareTo(another.Third()));
                }
            }
        }