@Test public void compareToTest() { var tabpageOne = new Tabpage(1); var tabpageTwo = new Tabpage(2); assertTrue(tabpageOne.compareTo(tabpageTwo) < 0); assertTrue(tabpageTwo.compareTo(tabpageOne) > 0); var tabpageOneAgain = new Tabpage(1); assertEquals(0, tabpageOne.compareTo(tabpageOneAgain)); assertEquals(0, tabpageOneAgain.compareTo(tabpageOne)); }
@Override public int compareTo(Tabpage o) { return Long.compare(getId(), o.getId()); }
Tabpage extends BaseCustomIdType implements Comparable<Tabpage> { @Override public int compareTo(Tabpage o) { return Long.compare(getId(), o.getId()); } }
Tabpage extends BaseCustomIdType implements Comparable<Tabpage> { @Override public int compareTo(Tabpage o) { return Long.compare(getId(), o.getId()); } Tabpage(long id); }
Tabpage extends BaseCustomIdType implements Comparable<Tabpage> { @Override public int compareTo(Tabpage o) { return Long.compare(getId(), o.getId()); } Tabpage(long id); @Override boolean equals(Object o); @Override int hashCode(); @Override int compareTo(Tabpage o); }
Tabpage extends BaseCustomIdType implements Comparable<Tabpage> { @Override public int compareTo(Tabpage o) { return Long.compare(getId(), o.getId()); } Tabpage(long id); @Override boolean equals(Object o); @Override int hashCode(); @Override int compareTo(Tabpage o);  }