Class ConstantMatcher

java.lang.Object
com.cloudbees.plugins.credentials.matchers.ConstantMatcher
All Implemented Interfaces:
CredentialsMatcher, Serializable

public class ConstantMatcher extends Object implements CredentialsMatcher
Matches credentials based on a constant result.
Since:
1.5
See Also:
  • Constructor Details

    • ConstantMatcher

      public ConstantMatcher(boolean match)
      Constructs a new instance.
      Parameters:
      match - whether to match or not.
  • Method Details

    • matches

      public boolean matches(@NonNull Credentials item)
      Evaluates the matcher for the specified credentials.
      Specified by:
      matches in interface CredentialsMatcher
      Parameters:
      item - the specified credentials.
      Returns:
      true if and only if the specified credentials match.
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object