MCPcopy Create free account
hub / github.com/bobbylight/RText / compareTo

Method compareTo

src/main/java/org/fife/rtext/plugins/tools/Tool.java:161–171  ·  view source on GitHub ↗

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)

Source from the content-addressed store, hash-verified

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 /**

Callers 1

equalsMethod · 0.95

Calls 1

getNameMethod · 0.95

Tested by

no test coverage detected