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