private int Compare(SorterItem <IdType> lhs, SorterItem <IdType> rhs) { int result; result = comparer.Compare(lhs.normalized_word, rhs.normalized_word); if (result == 0) { result = lhs.id.CompareTo(rhs.id); } return(result); }
public void Add(SorterItem <IdType> sorterItem) { int index = 0; if (sorterItem.initial == InitialNumerizer.Undefined) { index = GetIndex(sorterItem.normalized_word); } else if (sorterItem.initial == InitialNumerizer.UnUnique) { index = UnUniqueInitialIndex; } else { index = sorterItem.initial + 1; } initialBucket[index].Add(sorterItem); }