@Test public void comparable() { mod1 = new Mod(AAA); mod2 = new Mod(BBB); assertNotEquals("what?", mod1, mod2); assertTrue(mod1.compareTo(mod2) < 0); assertTrue(mod2.compareTo(mod1) > 0); }
@Override public int compareTo(Mod o) { return this.modId.compareTo(o.modId); }
Mod implements Comparable<Mod> { @Override public int compareTo(Mod o) { return this.modId.compareTo(o.modId); } }
Mod implements Comparable<Mod> { @Override public int compareTo(Mod o) { return this.modId.compareTo(o.modId); } Mod(String modId); }
Mod implements Comparable<Mod> { @Override public int compareTo(Mod o) { return this.modId.compareTo(o.modId); } Mod(String modId); @Override String toString(); @Override boolean equals(Object o); @Override int hashCode(); @Override int compareTo(Mod o); }
Mod implements Comparable<Mod> { @Override public int compareTo(Mod o) { return this.modId.compareTo(o.modId); } Mod(String modId); @Override String toString(); @Override boolean equals(Object o); @Override int hashCode(); @Override int compareTo(Mod o);  }