Package net.luckperms.api.node.matcher
Interface NodeMatcherFactory
A factory which creates
NodeMatchers.- Since:
- 5.1
-
Method Summary
Modifier and TypeMethodDescription<T extends Node>
@NonNull NodeMatcher<T>equals(@NonNull T other, @NonNull NodeEqualityPredicate equalityPredicate) Gets aNodeMatcherwhich matches nodes which areequal tothe givenothernode according to theNodeEqualityPredicate.Gets aNodeMatcherwhich matches nodes with the samekey.<T extends Node>
@NonNull NodeMatcher<T>Gets aNodeMatcherwhich matches nodes with the samekey.keyStartsWith(@NonNull String startingWith) Gets aNodeMatcherwhich matches nodes with akeystarting with the given string.<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.Prefer using the
NodeMatcher.key(String)accessor.- 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.Prefer using the
NodeMatcher.key(Node)accessor.- 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.Prefer using the
NodeMatcher.keyStartsWith(String)accessor.- Parameters:
startingWith- the string to match- Returns:
- the matcher
-
equals
<T extends Node> @NonNull NodeMatcher<T> equals(@NonNull T other, @NonNull NodeEqualityPredicate equalityPredicate) Gets aNodeMatcherwhich matches nodes which areequal tothe givenothernode according to theNodeEqualityPredicate.Prefer using the
NodeMatcher.equals(Node, NodeEqualityPredicate)accessor.- 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.Prefer using the
NodeMatcher.metaKey(String)accessor.- Parameters:
metaKey- 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.Prefer using the
NodeMatcher.type(NodeType)accessor.- Type Parameters:
T- the node type- Parameters:
type- the node type- Returns:
- the matcher
-