80eafbcb JB |
1 | import java.util.Comparator; |
2 | |
3 | class IStrComparator implements Comparator<String> { |
4 | private String wordToCompare; |
5 | |
6 | IStrComparator(String w) { |
7 | wordToCompare = w; |
8 | } |
9 | |
10 | public int compare(String str1, String str2) { |
11 | return str1.compareTo(str2); |
12 | } |
13 | |
14 | } |