/** * 2 Actions are considered equals if they share the same Entity, no matter the action identity or state. This is because 1 Entity can only have one action at a time. * * @param o Object to test for equality. * @return <code>true</code> if the test object is an action with the same Entity as this object. */ @Override public final boolean equals(final Object o) { return o instanceof Action && this.id.equals(((Action) o).id); }
/** * Check if 2 Actions are the same type and coming from the same module. * * @param a Other action to test. * @return <code>true</code> if the 2 actions have the same type. */ public final boolean isSameType(final Action a) { return this.id.equals(a.id); }
@Override public boolean equals(Object o) { if (this == o) { return true; } if (o == null || getClass() != o.getClass()) { return false; } ActionDto actionDto = (ActionDto) o; return id.equals(actionDto.id) && entity.equals(actionDto.entity); }