@Test public void testCompareTo() { OSMNode o = new OSMNode(1L, 1, new OSHDBTimestamp(1L), 1L, 1, new int[] {1, 1, 2, 2, 3, 3}, 1000000000L, 1000000000L); OSMNode instance = new OSMNode(1L, 1, new OSHDBTimestamp(1L), 1L, 1, new int[] {1, 1, 2, 2, 3, 3}, 1000000000L, 1000000000L); assertTrue(instance.compareTo(o) == 0); o = new OSMNode(1L, 3, new OSHDBTimestamp(1L), 1L, 1, new int[] {1, 1, 2, 2, 3, 3}, 1000000000L, 1000000000L); instance = new OSMNode(1L, 1, new OSHDBTimestamp(1L), 1L, 1, new int[] {1, 1, 2, 2, 3, 3}, 1000000000L, 1000000000L); assertTrue(instance.compareTo(o) < 0); o = new OSMNode(1L, 1, new OSHDBTimestamp(1L), 1L, 1, new int[] {1, 1, 2, 2, 3, 3}, 1000000000L, 1000000000L); instance = new OSMNode(1L, 3, new OSHDBTimestamp(1L), 1L, 1, new int[] {1, 1, 2, 2, 3, 3}, 1000000000L, 1000000000L); assertTrue(instance.compareTo(o) > 0); o = new OSMNode(1L, 1, new OSHDBTimestamp(1L), 1L, 1, new int[] {1, 1, 2, 2, 3, 3}, 1000000000L, 1000000000L); instance = new OSMNode(1L, -6, new OSHDBTimestamp(1L), 1L, 1, new int[] {1, 1, 2, 2, 3, 3}, 1000000000L, 1000000000L); assertTrue(instance.compareTo(o) > 0); }
@Override public int compareTo(OSMNode o) { int c = Long.compare(id, o.id); if (c == 0) { c = Integer.compare(Math.abs(version), Math.abs(o.version)); } if (c == 0) { c = Long.compare(timestamp.getRawUnixTimestamp(), o.timestamp.getRawUnixTimestamp()); } return c; }
OSMNode extends OSMEntity implements Comparable<OSMNode>, Serializable { @Override public int compareTo(OSMNode o) { int c = Long.compare(id, o.id); if (c == 0) { c = Integer.compare(Math.abs(version), Math.abs(o.version)); } if (c == 0) { c = Long.compare(timestamp.getRawUnixTimestamp(), o.timestamp.getRawUnixTimestamp()); } return c; } }
OSMNode extends OSMEntity implements Comparable<OSMNode>, Serializable { @Override public int compareTo(OSMNode o) { int c = Long.compare(id, o.id); if (c == 0) { c = Integer.compare(Math.abs(version), Math.abs(o.version)); } if (c == 0) { c = Long.compare(timestamp.getRawUnixTimestamp(), o.timestamp.getRawUnixTimestamp()); } return c; } OSMNode(final long id, final int version, final OSHDBTimestamp timestamp, final long changeset,
      final int userId, final int[] tags, final long longitude, final long latitude); }
OSMNode extends OSMEntity implements Comparable<OSMNode>, Serializable { @Override public int compareTo(OSMNode o) { int c = Long.compare(id, o.id); if (c == 0) { c = Integer.compare(Math.abs(version), Math.abs(o.version)); } if (c == 0) { c = Long.compare(timestamp.getRawUnixTimestamp(), o.timestamp.getRawUnixTimestamp()); } return c; } OSMNode(final long id, final int version, final OSHDBTimestamp timestamp, final long changeset,
      final int userId, final int[] tags, final long longitude, final long latitude); @Override OSMType getType(); double getLongitude(); double getLatitude(); long getLon(); long getLat(); @Override String toString(); boolean equalsTo(OSMNode o); @Override int compareTo(OSMNode o); }
OSMNode extends OSMEntity implements Comparable<OSMNode>, Serializable { @Override public int compareTo(OSMNode o) { int c = Long.compare(id, o.id); if (c == 0) { c = Integer.compare(Math.abs(version), Math.abs(o.version)); } if (c == 0) { c = Long.compare(timestamp.getRawUnixTimestamp(), o.timestamp.getRawUnixTimestamp()); } return c; } OSMNode(final long id, final int version, final OSHDBTimestamp timestamp, final long changeset,
      final int userId, final int[] tags, final long longitude, final long latitude); @Override OSMType getType(); double getLongitude(); double getLatitude(); long getLon(); long getLat(); @Override String toString(); boolean equalsTo(OSMNode o); @Override int compareTo(OSMNode o);  }