Package io.kubernetes.client.util.labels
Class SetMatcher
java.lang.Object
io.kubernetes.client.util.labels.SetMatcher
- All Implemented Interfaces:
LabelMatcher
Set-based matcher for label-selection.
https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/#set-based-requirement
-
Method Summary
Modifier and TypeMethodDescriptionstatic SetMatcher
The "exists" set matcher.getKey()
static SetMatcher
The "in" set matcher.static SetMatcher
The "not exists" set matcher.static SetMatcher
The "not in" set matcher.boolean
Returns true if a label value matches.toString()
-
Method Details
-
in
The "in" set matcher. Matches if the label exists in the set.- Parameters:
key
- the keyvalues
- the values- Returns:
- the set matcher
-
notIn
The "not in" set matcher. Matches if the label doesn't exist in the set.- Parameters:
key
- the keyvalues
- the values- Returns:
- the set matcher
-
exists
The "exists" set matcher. Matches if the label is present in the set.- Parameters:
key
- the key- Returns:
- the set matcher
-
notExists
The "not exists" set matcher. Matches if the label is not present in the set.- Parameters:
key
- the key- Returns:
- the set matcher
-
toString
-
getKey
- Specified by:
getKey
in interfaceLabelMatcher
-
test
Description copied from interface:LabelMatcher
Returns true if a label value matches.- Specified by:
test
in interfaceLabelMatcher
- Parameters:
s
- the label value- Returns:
- the boolean
-