/** * Return a copy of this credential set without any credentials of the given type that match the predicate. If no credentials match * the predicate, return this instance. * * @param credentialType the credential type class * @param predicate the predicate to test (must not be {@code null}) * @param <C> the credential type * @return the new credential set (not {@code null}) */ public final <C extends Credential> IdentityCredentials without(Class<C> credentialType, Predicate<? super C> predicate) { return without(c -> credentialType.isInstance(c) && predicate.test(credentialType.cast(c))); }
/** * Return a copy of this credential set without any credentials of the given type. If the credential type is not * found in this set, return this instance. * * @param credentialType the credential type to remove (must not be {@code null}) * @return the new credential set (not {@code null}) */ public final IdentityCredentials without(Class<? extends Credential> credentialType) { Assert.checkNotNullParam("credentialType", credentialType); return without(credentialType::isInstance); }
/** * Return a copy of this credential set without any credentials with a type, algorithm name, and parameters matching that of the * given credential. If the credential type, algorithm name, and parameters are not found in this set, return this instance. * * @param credential the credential to match against (must not be {@code null}) * @return the new credential set (not {@code null}) */ public IdentityCredentials withoutMatching(Credential credential) { Assert.checkNotNullParam("credential", credential); return without(credential::matches); }
/** * Return a copy of this credential set without any credentials of the given type and algorithm name. If the * credential type and algorithm name is not found in this set, return this instance. * * @param credentialType the credential type to remove (must not be {@code null}) * @param algorithmName the algorithm name to remove, or {@code null} to match any algorithm name * @return the new credential set (not {@code null}) */ public final IdentityCredentials without(final Class<? extends Credential> credentialType, final String algorithmName) { Assert.checkNotNullParam("credentialType", credentialType); return without(credentialType, algorithmName, null); }
/** * Return a copy of this credential set without any credentials of the given type, algorithm name and * parameter spec. If the credential type and algorithm name is not found in this set, return this instance. * * @param credentialType the credential type to remove (must not be {@code null}) * @param algorithmName the algorithm name to remove, or {@code null} to match any algorithm name * @param parameterSpec the parameter spec to remove, or {@code null} to match any parameter spec * @return the new credential set (not {@code null}) */ public IdentityCredentials without(final Class<? extends Credential> credentialType, final String algorithmName, final AlgorithmParameterSpec parameterSpec) { Assert.checkNotNullParam("credentialType", credentialType); return without(c -> c.matches(credentialType, algorithmName, parameterSpec)); }
/** * Return a copy of this credential set without any credentials of the given type that match the predicate. If no credentials match * the predicate, return this instance. * * @param credentialType the credential type class * @param predicate the predicate to test (must not be {@code null}) * @param <C> the credential type * @return the new credential set (not {@code null}) */ public final <C extends Credential> IdentityCredentials without(Class<C> credentialType, Predicate<? super C> predicate) { return without(c -> credentialType.isInstance(c) && predicate.test(credentialType.cast(c))); }
/** * Return a copy of this credential set without any credentials of the given type that match the predicate. If no credentials match * the predicate, return this instance. * * @param credentialType the credential type class * @param predicate the predicate to test (must not be {@code null}) * @param <C> the credential type * @return the new credential set (not {@code null}) */ public final <C extends Credential> IdentityCredentials without(Class<C> credentialType, Predicate<? super C> predicate) { return without(c -> credentialType.isInstance(c) && predicate.test(credentialType.cast(c))); }
/** * Return a copy of this credential set without any credentials of the given type that match the predicate. If no credentials match * the predicate, return this instance. * * @param credentialType the credential type class * @param predicate the predicate to test (must not be {@code null}) * @param <C> the credential type * @return the new credential set (not {@code null}) */ public final <C extends Credential> IdentityCredentials without(Class<C> credentialType, Predicate<? super C> predicate) { return without(c -> credentialType.isInstance(c) && predicate.test(credentialType.cast(c))); }
/** * Return a copy of this credential set without any credentials of the given type and algorithm name. If the * credential type and algorithm name is not found in this set, return this instance. * * @param credentialType the credential type to remove (must not be {@code null}) * @param algorithmName the algorithm name to remove, or {@code null} to match any algorithm name * @return the new credential set (not {@code null}) */ public final IdentityCredentials without(final Class<? extends Credential> credentialType, final String algorithmName) { Assert.checkNotNullParam("credentialType", credentialType); return without(credentialType, algorithmName, null); }
/** * Return a copy of this credential set without any credentials of the given type. If the credential type is not * found in this set, return this instance. * * @param credentialType the credential type to remove (must not be {@code null}) * @return the new credential set (not {@code null}) */ public final IdentityCredentials without(Class<? extends Credential> credentialType) { Assert.checkNotNullParam("credentialType", credentialType); return without(credentialType::isInstance); }
/** * Return a copy of this credential set without any credentials with a type, algorithm name, and parameters matching that of the * given credential. If the credential type, algorithm name, and parameters are not found in this set, return this instance. * * @param credential the credential to match against (must not be {@code null}) * @return the new credential set (not {@code null}) */ public IdentityCredentials withoutMatching(Credential credential) { Assert.checkNotNullParam("credential", credential); return without(credential::matches); }
/** * Return a copy of this credential set without any credentials of the given type. If the credential type is not * found in this set, return this instance. * * @param credentialType the credential type to remove (must not be {@code null}) * @return the new credential set (not {@code null}) */ public final IdentityCredentials without(Class<? extends Credential> credentialType) { Assert.checkNotNullParam("credentialType", credentialType); return without(credentialType::isInstance); }
/** * Return a copy of this credential set without any credentials with a type, algorithm name, and parameters matching that of the * given credential. If the credential type, algorithm name, and parameters are not found in this set, return this instance. * * @param credential the credential to match against (must not be {@code null}) * @return the new credential set (not {@code null}) */ public IdentityCredentials withoutMatching(Credential credential) { Assert.checkNotNullParam("credential", credential); return without(credential::matches); }
/** * Return a copy of this credential set without any credentials with a type, algorithm name, and parameters matching that of the * given credential. If the credential type, algorithm name, and parameters are not found in this set, return this instance. * * @param credential the credential to match against (must not be {@code null}) * @return the new credential set (not {@code null}) */ public IdentityCredentials withoutMatching(Credential credential) { Assert.checkNotNullParam("credential", credential); return without(credential::matches); }
/** * Return a copy of this credential set without any credentials of the given type and algorithm name. If the * credential type and algorithm name is not found in this set, return this instance. * * @param credentialType the credential type to remove (must not be {@code null}) * @param algorithmName the algorithm name to remove, or {@code null} to match any algorithm name * @return the new credential set (not {@code null}) */ public final IdentityCredentials without(final Class<? extends Credential> credentialType, final String algorithmName) { Assert.checkNotNullParam("credentialType", credentialType); return without(credentialType, algorithmName, null); }
/** * Return a copy of this credential set without any credentials of the given type and algorithm name. If the * credential type and algorithm name is not found in this set, return this instance. * * @param credentialType the credential type to remove (must not be {@code null}) * @param algorithmName the algorithm name to remove, or {@code null} to match any algorithm name * @return the new credential set (not {@code null}) */ public final IdentityCredentials without(final Class<? extends Credential> credentialType, final String algorithmName) { Assert.checkNotNullParam("credentialType", credentialType); return without(credentialType, algorithmName, null); }
/** * Return a copy of this credential set without any credentials of the given type. If the credential type is not * found in this set, return this instance. * * @param credentialType the credential type to remove (must not be {@code null}) * @return the new credential set (not {@code null}) */ public final IdentityCredentials without(Class<? extends Credential> credentialType) { Assert.checkNotNullParam("credentialType", credentialType); return without(credentialType::isInstance); }
/** * Return a copy of this credential set without any credentials of the given type, algorithm name and * parameter spec. If the credential type and algorithm name is not found in this set, return this instance. * * @param credentialType the credential type to remove (must not be {@code null}) * @param algorithmName the algorithm name to remove, or {@code null} to match any algorithm name * @param parameterSpec the parameter spec to remove, or {@code null} to match any parameter spec * @return the new credential set (not {@code null}) */ public IdentityCredentials without(final Class<? extends Credential> credentialType, final String algorithmName, final AlgorithmParameterSpec parameterSpec) { Assert.checkNotNullParam("credentialType", credentialType); return without(c -> c.matches(credentialType, algorithmName, parameterSpec)); }
/** * Return a copy of this credential set without any credentials of the given type, algorithm name and * parameter spec. If the credential type and algorithm name is not found in this set, return this instance. * * @param credentialType the credential type to remove (must not be {@code null}) * @param algorithmName the algorithm name to remove, or {@code null} to match any algorithm name * @param parameterSpec the parameter spec to remove, or {@code null} to match any parameter spec * @return the new credential set (not {@code null}) */ public IdentityCredentials without(final Class<? extends Credential> credentialType, final String algorithmName, final AlgorithmParameterSpec parameterSpec) { Assert.checkNotNullParam("credentialType", credentialType); return without(c -> c.matches(credentialType, algorithmName, parameterSpec)); }
/** * Return a copy of this credential set without any credentials of the given type, algorithm name and * parameter spec. If the credential type and algorithm name is not found in this set, return this instance. * * @param credentialType the credential type to remove (must not be {@code null}) * @param algorithmName the algorithm name to remove, or {@code null} to match any algorithm name * @param parameterSpec the parameter spec to remove, or {@code null} to match any parameter spec * @return the new credential set (not {@code null}) */ public IdentityCredentials without(final Class<? extends Credential> credentialType, final String algorithmName, final AlgorithmParameterSpec parameterSpec) { Assert.checkNotNullParam("credentialType", credentialType); return without(c -> c.matches(credentialType, algorithmName, parameterSpec)); }