@Test(dependsOnMethods = {"testInstantiation"}) public void testEquals() { Model mo = new DefaultModel(); List<VM> l = Arrays.asList(mo.newVM(), mo.newVM(), mo.newVM()); Seq c = new Seq(l); List<VM> l2 = new ArrayList<>(l); Seq c2 = new Seq(l2); Assert.assertTrue(c.equals(c2)); Assert.assertEquals(c.hashCode(), c2.hashCode()); l2.add(l2.remove(0)); Assert.assertFalse(c.equals(c2)); }
@Override public boolean equals(Object o) { if (this == o) { return true; } if (o == null || getClass() != o.getClass()) { return false; } Seq seq = (Seq) o; return Objects.equals(order, seq.order); }
Seq implements SatConstraint { @Override public boolean equals(Object o) { if (this == o) { return true; } if (o == null || getClass() != o.getClass()) { return false; } Seq seq = (Seq) o; return Objects.equals(order, seq.order); } }
Seq implements SatConstraint { @Override public boolean equals(Object o) { if (this == o) { return true; } if (o == null || getClass() != o.getClass()) { return false; } Seq seq = (Seq) o; return Objects.equals(order, seq.order); } Seq(List<VM> seq); }
Seq implements SatConstraint { @Override public boolean equals(Object o) { if (this == o) { return true; } if (o == null || getClass() != o.getClass()) { return false; } Seq seq = (Seq) o; return Objects.equals(order, seq.order); } Seq(List<VM> seq); @Override List<VM> getInvolvedVMs(); @Override String toString(); @Override boolean setContinuous(boolean b); @Override SatConstraintChecker<Seq> getChecker(); @Override boolean isContinuous(); @Override boolean equals(Object o); @Override int hashCode(); }
Seq implements SatConstraint { @Override public boolean equals(Object o) { if (this == o) { return true; } if (o == null || getClass() != o.getClass()) { return false; } Seq seq = (Seq) o; return Objects.equals(order, seq.order); } Seq(List<VM> seq); @Override List<VM> getInvolvedVMs(); @Override String toString(); @Override boolean setContinuous(boolean b); @Override SatConstraintChecker<Seq> getChecker(); @Override boolean isContinuous(); @Override boolean equals(Object o); @Override int hashCode();  }