public virtual int Compare(Lookup.LookupResult o1, Lookup.LookupResult o2) { // order on weight if (o1.value > o2.value) { return(1); } else if (o1.value < o2.value) { return(-1); } // otherwise on alphabetic order return(CHARSEQUENCE_COMPARATOR.Compare(o1.key, o2.key)); }
/// <summary> /// Compare alphabetically. </summary> public int CompareTo(LookupResult o) { return(CHARSEQUENCE_COMPARATOR.Compare(key, o.key)); }