@Test public void longPointEqualsToAnotherClassTest() { LongPoint lp = new LongPoint(1, 5, 234); Assert.assertFalse(lp.equals(new String())); }
@Override public boolean equals(Object obj) { if (obj == null) { return false; } if (obj instanceof Point<?>) { final Point<?> a = (Point<?>) obj; return NUMBER_COMPARATOR.compare(x, a.x) == 0 && NUMBER_COMPARATOR.compare(y, a.y) == 0; } else { return false; } }
Point { @Override public boolean equals(Object obj) { if (obj == null) { return false; } if (obj instanceof Point<?>) { final Point<?> a = (Point<?>) obj; return NUMBER_COMPARATOR.compare(x, a.x) == 0 && NUMBER_COMPARATOR.compare(y, a.y) == 0; } else { return false; } } }
Point { @Override public boolean equals(Object obj) { if (obj == null) { return false; } if (obj instanceof Point<?>) { final Point<?> a = (Point<?>) obj; return NUMBER_COMPARATOR.compare(x, a.x) == 0 && NUMBER_COMPARATOR.compare(y, a.y) == 0; } else { return false; } } protected  Point(Point<T> pt); protected  Point(T x, T y, T z); }
Point { @Override public boolean equals(Object obj) { if (obj == null) { return false; } if (obj instanceof Point<?>) { final Point<?> a = (Point<?>) obj; return NUMBER_COMPARATOR.compare(x, a.x) == 0 && NUMBER_COMPARATOR.compare(y, a.y) == 0; } else { return false; } } protected  Point(Point<T> pt); protected  Point(T x, T y, T z); @Override boolean equals(Object obj); void set(Point<T> other); void setX(T x); void setY(T y); void setZ(T z); @Override String toString(); }
Point { @Override public boolean equals(Object obj) { if (obj == null) { return false; } if (obj instanceof Point<?>) { final Point<?> a = (Point<?>) obj; return NUMBER_COMPARATOR.compare(x, a.x) == 0 && NUMBER_COMPARATOR.compare(y, a.y) == 0; } else { return false; } } protected  Point(Point<T> pt); protected  Point(T x, T y, T z); @Override boolean equals(Object obj); void set(Point<T> other); void setX(T x); void setY(T y); void setZ(T z); @Override String toString();  }