Compares this tool to another by name, lexicographically. @param t2 The other tool. @return The sort order of this tool, compared to another.
(Tool t2)
| 159 | * @return The sort order of this tool, compared to another. |
| 160 | */ |
| 161 | @Override |
| 162 | public int compareTo(Tool t2) { |
| 163 | int val = 1; |
| 164 | if (t2==this) { |
| 165 | val = 0; |
| 166 | } |
| 167 | else if (t2!=null) { |
| 168 | val = String.CASE_INSENSITIVE_ORDER.compare(getName(),t2.getName()); |
| 169 | } |
| 170 | return val; |
| 171 | } |
| 172 | |
| 173 | |
| 174 | /** |