@Test public void testEquals() { Model mo = new DefaultModel(); VM v = mo.newVM(); Sleeping s = new Sleeping(v); Assert.assertTrue(s.equals(s)); Assert.assertTrue(new Sleeping(v).equals(s)); Assert.assertEquals(new Sleeping(v).hashCode(), s.hashCode()); Assert.assertFalse(new Sleeping(mo.newVM()).equals(s)); }
@Override public boolean equals(Object o) { if (this == o) { return true; } if (o == null || getClass() != o.getClass()) { return false; } Sleeping sleeping = (Sleeping) o; return Objects.equals(vm, sleeping.vm); }
Sleeping extends SimpleConstraint { @Override public boolean equals(Object o) { if (this == o) { return true; } if (o == null || getClass() != o.getClass()) { return false; } Sleeping sleeping = (Sleeping) o; return Objects.equals(vm, sleeping.vm); } }
Sleeping extends SimpleConstraint { @Override public boolean equals(Object o) { if (this == o) { return true; } if (o == null || getClass() != o.getClass()) { return false; } Sleeping sleeping = (Sleeping) o; return Objects.equals(vm, sleeping.vm); } Sleeping(VM vm); }
Sleeping extends SimpleConstraint { @Override public boolean equals(Object o) { if (this == o) { return true; } if (o == null || getClass() != o.getClass()) { return false; } Sleeping sleeping = (Sleeping) o; return Objects.equals(vm, sleeping.vm); } Sleeping(VM vm); @Override boolean setContinuous(boolean b); @Override SleepingChecker getChecker(); @Override String toString(); @Override Collection<VM> getInvolvedVMs(); @Override boolean equals(Object o); @Override int hashCode(); static List<Sleeping> newSleeping(Collection<VM> vms); }
Sleeping extends SimpleConstraint { @Override public boolean equals(Object o) { if (this == o) { return true; } if (o == null || getClass() != o.getClass()) { return false; } Sleeping sleeping = (Sleeping) o; return Objects.equals(vm, sleeping.vm); } Sleeping(VM vm); @Override boolean setContinuous(boolean b); @Override SleepingChecker getChecker(); @Override String toString(); @Override Collection<VM> getInvolvedVMs(); @Override boolean equals(Object o); @Override int hashCode(); static List<Sleeping> newSleeping(Collection<VM> vms);  }