Package org.eclipse.ltk.core.refactoring
Interface IRefactoringStatusEntryComparator
public interface IRefactoringStatusEntryComparator
Comparator class to compare two refactoring status entries. The general
contract of this class is equivalent to the one of class
Comparator
from the Java Collection Framework.
This interface is intended to be implemented by clients.
- Since:
- 3.1
-
Method Summary
Modifier and TypeMethodDescriptionint
compare
(RefactoringStatusEntry entry1, RefactoringStatusEntry entry2) Compares two refactoring status entries for order.
-
Method Details
-
compare
Compares two refactoring status entries for order. Returns a negative integer, zero, or a positive integer as the first status entry is less than, equal to, or greater than the second.The implementor must ensure that
sgn(compare(x, y)) == -sgn(compare(y, x))
for allx
andy
.The implementor must ensure that the relation is transitive:
((compare(x, y)>0) && (compare(y, z)>0))
impliescompare(x, z)>0
.Furthermore, the implementer must ensure that
compare(x, y)==0
implies thatsgn(compare(x, z))==sgn(compare(y, z))
for allz
.- Parameters:
entry1
- the first refactoring status entry to be compared.entry2
- the second refactoring status entry to be compared.- Returns:
- a negative integer, zero, or a positive integer as the first status entry is less than, equal to, or greater than the second.
-