/** * This is related to an {@link ElementId} if either the ElementId is equal * to this EdgeId or it is an EntityId and its identifier matches this * EdgeId's source or destination. * * @param that the {@link ElementId} to compare * @return An instance of {@link ElementId.Matches} to describe how the ids are related. */ @SuppressFBWarnings(value = "BC_UNCONFIRMED_CAST", justification = "If an element is not an Edge it must be an Entity") @Override default Matches isRelated(final ElementId that) { if (that instanceof EdgeId) { if (isEqual(that)) { return Matches.BOTH; } return Matches.NONE; } return isRelated((EntityId) that); }
/** * This is related to an {@link ElementId} if either the ElementId is equal * to this EdgeId or it is an EntityId and its identifier matches this * EdgeId's source or destination. * * @param that the {@link ElementId} to compare * @return An instance of {@link ElementId.Matches} to describe how the ids are related. */ @SuppressFBWarnings(value = "BC_UNCONFIRMED_CAST", justification = "If an element is not an Edge it must be an Entity") @Override default Matches isRelated(final ElementId that) { if (that instanceof EdgeId) { if (isEqual(that)) { return Matches.BOTH; } return Matches.NONE; } return isRelated((EntityId) that); }