Class IdentityCredentials.Two

    • Method Detail

      • contains

        public boolean contains​(Class<? extends Credential> credentialType,
                                String algorithmName,
                                AlgorithmParameterSpec parameterSpec)
        Description copied from class: IdentityCredentials
        Determine whether a credential of the given type and algorithm are present in this set.
        Specified by:
        contains in class IdentityCredentials
        Parameters:
        credentialType - the credential type class (must not be null)
        algorithmName - the algorithm name, or null if any algorithm is acceptable or the credential type does not support algorithm names
        parameterSpec - the parameter specification or null if any parameter specification is acceptable
        Returns:
        true if a matching credential is contained in this set, false otherwise
      • getCredential

        public <C extends Credential> C getCredential​(Class<C> credentialType,
                                                      String algorithmName,
                                                      AlgorithmParameterSpec parameterSpec)
        Description copied from class: IdentityCredentials
        Acquire a credential of the given type and algorithm name.
        Specified by:
        getCredential in interface CredentialSource
        Specified by:
        getCredential in class IdentityCredentials
        Type Parameters:
        C - the credential type
        Parameters:
        credentialType - the credential type class (must not be null)
        algorithmName - the algorithm name, or null if any algorithm is acceptable or the credential type does not support algorithm names
        parameterSpec - the parameter specification or null if any parameter specification is acceptable
        Returns:
        the credential, or null if no such credential exists
      • with

        public CredentialSource with​(CredentialSource other)
        Description copied from interface: CredentialSource
        Aggregate this credential source with another.
        Parameters:
        other - the other credential source (must not be null)
        Returns:
        the aggregated credential source (not null)
      • applyToCredential

        public <C extends Credential,​R> R applyToCredential​(Class<C> credentialType,
                                                                  String algorithmName,
                                                                  AlgorithmParameterSpec parameterSpec,
                                                                  Function<C,​R> function)
        Description copied from class: IdentityCredentials
        Apply the given function to the acquired credential, if it is set and of the given type and algorithm.
        Specified by:
        applyToCredential in interface CredentialSource
        Overrides:
        applyToCredential in class IdentityCredentials
        Type Parameters:
        C - the credential type
        R - the return type
        Parameters:
        credentialType - the credential type class (must not be null)
        algorithmName - the algorithm name
        parameterSpec - the parameter specification or null if any parameter specification is acceptable
        function - the function to apply (must not be null)
        Returns:
        the result of the function, or null if the criteria are not met
      • withoutMatching

        public IdentityCredentials withoutMatching​(Credential credential)
        Description copied from class: IdentityCredentials
        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.
        Overrides:
        withoutMatching in class IdentityCredentials
        Parameters:
        credential - the credential to match against (must not be null)
        Returns:
        the new credential set (not null)
      • without

        public IdentityCredentials without​(Class<? extends Credential> credentialType,
                                           String algorithmName,
                                           AlgorithmParameterSpec parameterSpec)
        Description copied from class: IdentityCredentials
        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.
        Specified by:
        without in interface CredentialSource
        Overrides:
        without in class IdentityCredentials
        Parameters:
        credentialType - the credential type to remove (must not be null)
        algorithmName - the algorithm name to remove, or null to match any algorithm name
        parameterSpec - the parameter spec to remove, or null to match any parameter spec
        Returns:
        the new credential set (not null)
      • without

        public IdentityCredentials without​(Predicate<? super Credential> predicate)
        Description copied from class: IdentityCredentials
        Return a copy of this credential set without any credentials that match the predicate. If no credentials match the predicate, return this instance.
        Specified by:
        without in class IdentityCredentials
        Parameters:
        predicate - the predicate to test (must not be null)
        Returns:
        the new credential set (not null)
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object