/** * Checks if the given package id matches this dependency specification. * @param id the package id * @return {@code true} if matches */ public boolean matches(@Nonnull PackageId id) { return groupId.equals(id.getGroup()) && name.equals(id.getName()) && range.isInRange(id.getVersion()); }