@Test public void testEquals() { CustomXYURLGenerator g1 = new CustomXYURLGenerator(); CustomXYURLGenerator g2 = new CustomXYURLGenerator(); assertEquals(g1, g2); List<String> u1 = new java.util.ArrayList<String>(); u1.add("URL A1"); u1.add("URL A2"); u1.add("URL A3"); g1.addURLSeries(u1); assertFalse(g1.equals(g2)); List<String> u2 = new java.util.ArrayList<String>(); u2.add("URL A1"); u2.add("URL A2"); u2.add("URL A3"); g2.addURLSeries(u2); assertEquals(g1, g2); }
@Override public boolean equals(Object obj) { if (obj == this) { return true; } if (!(obj instanceof CustomXYURLGenerator)) { return false; } CustomXYURLGenerator that = (CustomXYURLGenerator) obj; int listCount = getListCount(); if (listCount != that.getListCount()) { return false; } for (int series = 0; series < listCount; series++) { int urlCount = getURLCount(series); if (urlCount != that.getURLCount(series)) { return false; } for (int item = 0; item < urlCount; item++) { String u1 = getURL(series, item); String u2 = that.getURL(series, item); if (u1 != null) { if (!u1.equals(u2)) { return false; } } else { if (u2 != null) { return false; } } } } return true; }
CustomXYURLGenerator implements XYURLGenerator, Cloneable,
        PublicCloneable, Serializable { @Override public boolean equals(Object obj) { if (obj == this) { return true; } if (!(obj instanceof CustomXYURLGenerator)) { return false; } CustomXYURLGenerator that = (CustomXYURLGenerator) obj; int listCount = getListCount(); if (listCount != that.getListCount()) { return false; } for (int series = 0; series < listCount; series++) { int urlCount = getURLCount(series); if (urlCount != that.getURLCount(series)) { return false; } for (int item = 0; item < urlCount; item++) { String u1 = getURL(series, item); String u2 = that.getURL(series, item); if (u1 != null) { if (!u1.equals(u2)) { return false; } } else { if (u2 != null) { return false; } } } } return true; } }
CustomXYURLGenerator implements XYURLGenerator, Cloneable,
        PublicCloneable, Serializable { @Override public boolean equals(Object obj) { if (obj == this) { return true; } if (!(obj instanceof CustomXYURLGenerator)) { return false; } CustomXYURLGenerator that = (CustomXYURLGenerator) obj; int listCount = getListCount(); if (listCount != that.getListCount()) { return false; } for (int series = 0; series < listCount; series++) { int urlCount = getURLCount(series); if (urlCount != that.getURLCount(series)) { return false; } for (int item = 0; item < urlCount; item++) { String u1 = getURL(series, item); String u2 = that.getURL(series, item); if (u1 != null) { if (!u1.equals(u2)) { return false; } } else { if (u2 != null) { return false; } } } } return true; } CustomXYURLGenerator(); }
CustomXYURLGenerator implements XYURLGenerator, Cloneable,
        PublicCloneable, Serializable { @Override public boolean equals(Object obj) { if (obj == this) { return true; } if (!(obj instanceof CustomXYURLGenerator)) { return false; } CustomXYURLGenerator that = (CustomXYURLGenerator) obj; int listCount = getListCount(); if (listCount != that.getListCount()) { return false; } for (int series = 0; series < listCount; series++) { int urlCount = getURLCount(series); if (urlCount != that.getURLCount(series)) { return false; } for (int item = 0; item < urlCount; item++) { String u1 = getURL(series, item); String u2 = that.getURL(series, item); if (u1 != null) { if (!u1.equals(u2)) { return false; } } else { if (u2 != null) { return false; } } } } return true; } CustomXYURLGenerator(); int getListCount(); int getURLCount(int list); String getURL(int series, int item); @Override String generateURL(XYDataset dataset, int series, int item); void addURLSeries(List<String> urls); @Override boolean equals(Object obj); @Override Object clone(); }
CustomXYURLGenerator implements XYURLGenerator, Cloneable,
        PublicCloneable, Serializable { @Override public boolean equals(Object obj) { if (obj == this) { return true; } if (!(obj instanceof CustomXYURLGenerator)) { return false; } CustomXYURLGenerator that = (CustomXYURLGenerator) obj; int listCount = getListCount(); if (listCount != that.getListCount()) { return false; } for (int series = 0; series < listCount; series++) { int urlCount = getURLCount(series); if (urlCount != that.getURLCount(series)) { return false; } for (int item = 0; item < urlCount; item++) { String u1 = getURL(series, item); String u2 = that.getURL(series, item); if (u1 != null) { if (!u1.equals(u2)) { return false; } } else { if (u2 != null) { return false; } } } } return true; } CustomXYURLGenerator(); int getListCount(); int getURLCount(int list); String getURL(int series, int item); @Override String generateURL(XYDataset dataset, int series, int item); void addURLSeries(List<String> urls); @Override boolean equals(Object obj); @Override Object clone();  }