@Test public void testProcedureEquality() { Procedure proc1 = new TestProcedure(QName.valueOf("foo.bar:proc")) {}; Procedure proc2 = new TestProcedure(QName.valueOf("foo.bar:proc")) {}; Procedure proc3 = new TestProcedure(QName.valueOf("foo.bar:proc"), QName.valueOf("some:origin")) {}; Procedure proc4 = new TestProcedure(QName.valueOf("foo.bar:proc2")) {}; Procedure proc5 = new TestProcedure(QName.valueOf("foo.bar:proc"), QName.valueOf("some:origin")) {}; assertEquals(proc1, proc2); assertFalse(proc2.equals(proc3)); assertFalse(proc1.equals(proc4)); assertEquals(proc3, proc5); }
@Override public boolean equals(final Object o) { if (this == o) { return true; } if (!(o instanceof InteractionUnit)) { return false; } InteractionUnit that = (InteractionUnit) o; if (!id.equals(that.id)) { return false; } return true; }
InteractionUnit implements Consumer, Producer { @Override public boolean equals(final Object o) { if (this == o) { return true; } if (!(o instanceof InteractionUnit)) { return false; } InteractionUnit that = (InteractionUnit) o; if (!id.equals(that.id)) { return false; } return true; } }
InteractionUnit implements Consumer, Producer { @Override public boolean equals(final Object o) { if (this == o) { return true; } if (!(o instanceof InteractionUnit)) { return false; } InteractionUnit that = (InteractionUnit) o; if (!id.equals(that.id)) { return false; } return true; } protected  InteractionUnit(QName id, final String label); protected  InteractionUnit(final QName id, final String label, S stereotype); }
InteractionUnit implements Consumer, Producer { @Override public boolean equals(final Object o) { if (this == o) { return true; } if (!(o instanceof InteractionUnit)) { return false; } InteractionUnit that = (InteractionUnit) o; if (!id.equals(that.id)) { return false; } return true; } protected  InteractionUnit(QName id, final String label); protected  InteractionUnit(final QName id, final String label, S stereotype); S getStereotype(); @Override boolean equals(final Object o); @Override int hashCode(); @Override String toString(); void addMapping(Mapping mapping); boolean hasMapping(MappingType type); T findMapping(MappingType type); T findMapping(MappingType type, Predicate<T> predicate); @Override Set<Resource<ResourceType>> getInputs(); @Override boolean doesConsume(Resource<ResourceType> event); void accept(InteractionUnitVisitor visitor); InteractionUnit getParent(); boolean hasParent(); QName getId(); String getLabel(); void setLabel(final String label); @Override boolean doesConsume(); @Override boolean doesProduce(); boolean doesProduce(Resource<ResourceType> resource); @Override void setOutputs(Resource<ResourceType>... resource); @Override void setInputs(Resource<ResourceType>... resource); Set<Resource<ResourceType>> getOutputs(); }
InteractionUnit implements Consumer, Producer { @Override public boolean equals(final Object o) { if (this == o) { return true; } if (!(o instanceof InteractionUnit)) { return false; } InteractionUnit that = (InteractionUnit) o; if (!id.equals(that.id)) { return false; } return true; } protected  InteractionUnit(QName id, final String label); protected  InteractionUnit(final QName id, final String label, S stereotype); S getStereotype(); @Override boolean equals(final Object o); @Override int hashCode(); @Override String toString(); void addMapping(Mapping mapping); boolean hasMapping(MappingType type); T findMapping(MappingType type); T findMapping(MappingType type, Predicate<T> predicate); @Override Set<Resource<ResourceType>> getInputs(); @Override boolean doesConsume(Resource<ResourceType> event); void accept(InteractionUnitVisitor visitor); InteractionUnit getParent(); boolean hasParent(); QName getId(); String getLabel(); void setLabel(final String label); @Override boolean doesConsume(); @Override boolean doesProduce(); boolean doesProduce(Resource<ResourceType> resource); @Override void setOutputs(Resource<ResourceType>... resource); @Override void setInputs(Resource<ResourceType>... resource); Set<Resource<ResourceType>> getOutputs();  }