Package net.luckperms.api.node.matcher
Interface NodeMatcher<T extends Node>
- Type Parameters:
T- the node type matched
A predicate which matches certain
Nodes.
API users should not implement this interface directly.
- Since:
- 5.1
-
Method Summary
Modifier and TypeMethodDescriptionstatic <T extends Node>
@NonNull NodeMatcher<T>equals(@NonNull T other, @NonNull NodeEqualityPredicate equalityPredicate) Gets aNodeMatcherwhich matches nodes which areequal tothe givenothernode according to theNodeEqualityPredicate.static @NonNull NodeMatcher<Node>Gets aNodeMatcherwhich matches nodes with the samekey.static <T extends Node>
@NonNull NodeMatcher<T>Gets aNodeMatcherwhich matches nodes with the samekey.static @NonNull NodeMatcher<Node>keyStartsWith(@NonNull String startingWith) Gets aNodeMatcherwhich matches nodes with akeystarting with the given string.static @NonNull NodeMatcher<MetaNode>static @NonNull NodeMatcher<MetaNode>booleanTests to see if the givenNodematches.static <T extends Node>
@NonNull NodeMatcher<T>
-
Method Details
-
key
Gets aNodeMatcherwhich matches nodes with the samekey.The
String.equalsIgnoreCase(String)method is used to test key equality.- Parameters:
key- the key- Returns:
- the matcher
-
key
Gets aNodeMatcherwhich matches nodes with the samekey.The
String.equalsIgnoreCase(String)method is used to test key equality.- Type Parameters:
T- the node type- Parameters:
node- the node to use for the key- Returns:
- the matcher
-
keyStartsWith
Gets aNodeMatcherwhich matches nodes with akeystarting with the given string.- Parameters:
startingWith- the string to match- Returns:
- the matcher
-
equals
static <T extends Node> @NonNull NodeMatcher<T> equals(@NonNull T other, @NonNull NodeEqualityPredicate equalityPredicate) Gets aNodeMatcherwhich matches nodes which areequal tothe givenothernode according to theNodeEqualityPredicate.- Type Parameters:
T- the node type- Parameters:
other- the other node to test againstequalityPredicate- the equality predicate- Returns:
- the matcher
-
metaKey
Gets aNodeMatcherwhich matchesMetaNodes with the samemeta key.The
String.equalsIgnoreCase(String)method is used to test key equality.- Parameters:
metaKey- the meta key- Returns:
- the matcher
-
metaKey
Gets aNodeMatcherwhich matchesMetaNodes with the samemeta key.The
String.equalsIgnoreCase(String)method is used to test key equality.- Parameters:
metaNode- the meta node to use for the meta key- Returns:
- the matcher
-
type
Gets aNodeMatcherwhich matchesNodes with the same type as the givenNodeType.NodeType.PERMISSION,NodeType.CHAT_METAandNodeType.META_OR_CHAT_METAare not supported by this method.- Type Parameters:
T- the node type- Parameters:
type- the node type- Returns:
- the matcher
-
test
Tests to see if the givenNodematches.
-