@Test public void testEquals() { Model mo = new DefaultModel(); List<Node> ns = Util.newNodes(mo, 10); Offline s = new Offline(ns.get(0)); Assert.assertTrue(s.equals(s)); Assert.assertTrue(new Offline(ns.get(0)).equals(s)); Assert.assertEquals(new Offline(ns.get(0)).hashCode(), s.hashCode()); Assert.assertFalse(new Offline(ns.get(1)).equals(s)); }
@Override public boolean equals(Object o) { if (this == o) { return true; } if (o == null || getClass() != o.getClass()) { return false; } Offline offline = (Offline) o; return Objects.equals(node, offline.node); }
Offline extends SimpleConstraint { @Override public boolean equals(Object o) { if (this == o) { return true; } if (o == null || getClass() != o.getClass()) { return false; } Offline offline = (Offline) o; return Objects.equals(node, offline.node); } }
Offline extends SimpleConstraint { @Override public boolean equals(Object o) { if (this == o) { return true; } if (o == null || getClass() != o.getClass()) { return false; } Offline offline = (Offline) o; return Objects.equals(node, offline.node); } Offline(Node n); }
Offline extends SimpleConstraint { @Override public boolean equals(Object o) { if (this == o) { return true; } if (o == null || getClass() != o.getClass()) { return false; } Offline offline = (Offline) o; return Objects.equals(node, offline.node); } Offline(Node n); @Override boolean setContinuous(boolean b); @Override OfflineChecker getChecker(); @Override String toString(); @Override boolean equals(Object o); @Override int hashCode(); @Override Collection<Node> getInvolvedNodes(); static List<Offline> newOffline(Collection<Node> nodes); static List<Offline> newOffline(Node... nodes); }
Offline extends SimpleConstraint { @Override public boolean equals(Object o) { if (this == o) { return true; } if (o == null || getClass() != o.getClass()) { return false; } Offline offline = (Offline) o; return Objects.equals(node, offline.node); } Offline(Node n); @Override boolean setContinuous(boolean b); @Override OfflineChecker getChecker(); @Override String toString(); @Override boolean equals(Object o); @Override int hashCode(); @Override Collection<Node> getInvolvedNodes(); static List<Offline> newOffline(Collection<Node> nodes); static List<Offline> newOffline(Node... nodes);  }