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 SetMatcherThe "exists" set matcher.getKey()static SetMatcherThe "in" set matcher.static SetMatcherThe "not exists" set matcher.static SetMatcherThe "not in" set matcher.booleanReturns 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:
getKeyin interfaceLabelMatcher
-
test
Description copied from interface:LabelMatcherReturns true if a label value matches.- Specified by:
testin interfaceLabelMatcher- Parameters:
s- the label value- Returns:
- the boolean
-