@Test public void compareToInputNotNullOutputNegative() { final GraphEdge objectUnderTest = new GraphEdge(null, -1, 232_501_675); final GraphEdge other = new GraphEdge(null, -1, 435_655_486); final int retval = objectUnderTest.compareTo(other); Assert.assertEquals(-1, retval); }
@Override public int compareTo(GraphEdge other) { int i = ((Comparable<Object>) value).compareTo(other.value); if (i == 0) { int j = ((Comparable<Object>) x).compareTo(other.x); if (j == 0) { return ((Comparable<Object>) y).compareTo(other.y); } else { return j; } } else { return i; } }
GraphEdge implements Comparable<GraphEdge> { @Override public int compareTo(GraphEdge other) { int i = ((Comparable<Object>) value).compareTo(other.value); if (i == 0) { int j = ((Comparable<Object>) x).compareTo(other.x); if (j == 0) { return ((Comparable<Object>) y).compareTo(other.y); } else { return j; } } else { return i; } } }
GraphEdge implements Comparable<GraphEdge> { @Override public int compareTo(GraphEdge other) { int i = ((Comparable<Object>) value).compareTo(other.value); if (i == 0) { int j = ((Comparable<Object>) x).compareTo(other.x); if (j == 0) { return ((Comparable<Object>) y).compareTo(other.y); } else { return j; } } else { return i; } } GraphEdge(Object x, Object y, Object value); }
GraphEdge implements Comparable<GraphEdge> { @Override public int compareTo(GraphEdge other) { int i = ((Comparable<Object>) value).compareTo(other.value); if (i == 0) { int j = ((Comparable<Object>) x).compareTo(other.x); if (j == 0) { return ((Comparable<Object>) y).compareTo(other.y); } else { return j; } } else { return i; } } GraphEdge(Object x, Object y, Object value); Object getX(); Object getY(); Object getValue(); boolean equals(GraphEdge other); @Override int hashCode(); @Override String toString(); @Override boolean equals(Object other); @Override int compareTo(GraphEdge other); }
GraphEdge implements Comparable<GraphEdge> { @Override public int compareTo(GraphEdge other) { int i = ((Comparable<Object>) value).compareTo(other.value); if (i == 0) { int j = ((Comparable<Object>) x).compareTo(other.x); if (j == 0) { return ((Comparable<Object>) y).compareTo(other.y); } else { return j; } } else { return i; } } GraphEdge(Object x, Object y, Object value); Object getX(); Object getY(); Object getValue(); boolean equals(GraphEdge other); @Override int hashCode(); @Override String toString(); @Override boolean equals(Object other); @Override int compareTo(GraphEdge other);  }