@Test public void testCompareValueWithTolerance() throws Exception { double one = 1.000000001d; double two = 1.000000002d; double tolerance = 1; Assert.assertTrue(Compare.value(one,one)); Assert.assertTrue(Compare.value(two,two)); Assert.assertFalse(Compare.value(one,two)); for (int i =0 ; i <= 8 ; i++ ) { Assert.assertTrue(Compare.value(one,two,tolerance)); tolerance *= 10; } Assert.assertFalse(Compare.value(one,two,tolerance)); }
public static boolean value(String one, String two) { return one.equals(two); }
Compare { public static boolean value(String one, String two) { return one.equals(two); } }
Compare { public static boolean value(String one, String two) { return one.equals(two); }  }
Compare { public static boolean value(String one, String two) { return one.equals(two); }  static boolean value(String one, String two); static boolean value(double one, double two); static boolean value(double one, double two, double tolerance); }
Compare { public static boolean value(String one, String two) { return one.equals(two); }  static boolean value(String one, String two); static boolean value(double one, double two); static boolean value(double one, double two, double tolerance);  }