public class TargetFileComparator extends java.lang.Object implements java.util.Comparator<TargetFile>
Modifier and Type | Method and Description |
---|---|
int |
compare(TargetFile file1,
TargetFile file2) |
boolean |
equals(java.lang.Object o)
Returns true if both TargetF ileComparator instances use the same
order criterion (name or path).
|
int |
hashCode() |
void |
invert()
Invert the effect of the current sort criterion (asc vs.
|
boolean |
isOrderByName()
Returns true if the current sort criterion
is "by name".
|
static TargetFileComparator |
orderByName()
Returns a comparator that sorts TargetFile objects by name.
|
static TargetFileComparator |
orderByPath()
Returns a comparator that sorts TargetFile objects by path.
|
public static TargetFileComparator orderByName()
public static TargetFileComparator orderByPath()
public void invert()
public boolean isOrderByName()
public int compare(TargetFile file1, TargetFile file2)
compare
in interface java.util.Comparator<TargetFile>
public boolean equals(java.lang.Object o)
equals
in interface java.util.Comparator<TargetFile>
equals
in class java.lang.Object
o
- object to compare this withpublic int hashCode()
hashCode
in class java.lang.Object