Class UsernameMatcher
- java.lang.Object
-
- com.cloudbees.plugins.credentials.matchers.UsernameMatcher
-
- All Implemented Interfaces:
CredentialsMatcher
,CredentialsMatcher.CQL
,Serializable
public class UsernameMatcher extends Object implements CredentialsMatcher, CredentialsMatcher.CQL
Matches credentials that areUsernameCredentials
and have the specifiedUsernameCredentials.getUsername()
- Since:
- 1.5
- See Also:
- Serialized Form
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface com.cloudbees.plugins.credentials.CredentialsMatcher
CredentialsMatcher.CQL
-
-
Constructor Summary
Constructors Constructor Description UsernameMatcher(String username)
Constructs a new instance.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description String
describe()
Describes this matcher in terms of a java-bean style query languageboolean
equals(Object o)
int
hashCode()
boolean
matches(Credentials item)
Evaluates the matcher for the specified credentials.String
toString()
-
-
-
Constructor Detail
-
UsernameMatcher
public UsernameMatcher(@NonNull String username)
Constructs a new instance.- Parameters:
username
- the username to match.
-
-
Method Detail
-
matches
public boolean matches(@NonNull Credentials item)
Evaluates the matcher for the specified credentials.- Specified by:
matches
in interfaceCredentialsMatcher
- Parameters:
item
- the specified credentials.- Returns:
true
if and only if the specified credentials match.
-
describe
public String describe()
Describes this matcher in terms of a java-bean style query language- Specified by:
describe
in interfaceCredentialsMatcher.CQL
- Returns:
- the description of the credentials matcher query or
null
if the matcher cannot be expressed in CQL.
-
-