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