public interface KeyPattern
extends net.kyori.examination.Examinable
Key pattern or predicate, uses
regular expressions to match Key.namespace()'s
and/or Key.value()'s| Modifier and Type | Method and Description |
|---|---|
static @NotNull KeyPattern |
any()
Creates a new
KeyPattern instance
that will filter any file |
@Nullable java.util.regex.Pattern |
namespace()
Returns the
key's namespace
pattern to match. |
static @NotNull KeyPattern |
of(@Nullable java.util.regex.Pattern namespace,
@Nullable java.util.regex.Pattern value)
Creates a new
KeyPattern instance
that will filter keys using the specified
namespace pattern and value pattern |
static @NotNull KeyPattern |
of(@Nullable java.lang.String namespace,
@Nullable java.lang.String value)
Creates a new
KeyPattern instance
that will filter keys using the specified
namespace pattern and value pattern |
static @NotNull KeyPattern |
ofNamespace(@Nullable java.util.regex.Pattern namespace)
Creates a new
KeyPattern instance
that will filter keys using the specified
namespace pattern and will filter any value |
static @NotNull KeyPattern |
ofNamespace(@Nullable java.lang.String namespace)
Creates a new
KeyPattern instance
that will filter keys using the specified
namespace pattern and will filter any value |
static @NotNull KeyPattern |
ofValue(@Nullable java.util.regex.Pattern value)
Creates a new
KeyPattern instance
that will filter keys using the specified
value pattern and will apply to every namespace |
static @NotNull KeyPattern |
ofValue(@Nullable java.lang.String value)
Creates a new
KeyPattern instance
that will filter keys using the specified
value pattern and will apply to every namespace |
boolean |
test(@NotNull net.kyori.adventure.key.Key key)
Tests if the given
Key matches with this
pattern. |
@Nullable java.util.regex.Pattern |
value()
Returns the
key's value
pattern to match. |
@Nullable @Nullable java.util.regex.Pattern namespace()
key's namespace
pattern to match.
If null, it will apply to every namespace
@Nullable @Nullable java.util.regex.Pattern value()
key's value
pattern to match.
If null, it will apply to every value
boolean test(@NotNull
@NotNull net.kyori.adventure.key.Key key)
Key matches with this
pattern. Results match with Minecraft Vanilla
Client testskey - The tested key@NotNull static @NotNull KeyPattern of(@Nullable @Nullable java.util.regex.Pattern namespace, @Nullable @Nullable java.util.regex.Pattern value)
KeyPattern instance
that will filter keys using the specified
namespace pattern and value patternnamespace - The namespace patternvalue - The value patternKeyPattern instance@NotNull static @NotNull KeyPattern of(@RegExp @Nullable @Nullable java.lang.String namespace, @RegExp @Nullable @Nullable java.lang.String value)
KeyPattern instance
that will filter keys using the specified
namespace pattern and value patternnamespace - The namespace patternvalue - The value patternKeyPattern instance@NotNull static @NotNull KeyPattern ofNamespace(@Nullable @Nullable java.util.regex.Pattern namespace)
KeyPattern instance
that will filter keys using the specified
namespace pattern and will filter any valuenamespace - The namespace patternKeyPattern instance@NotNull static @NotNull KeyPattern ofNamespace(@RegExp @Nullable @Nullable java.lang.String namespace)
KeyPattern instance
that will filter keys using the specified
namespace pattern and will filter any valuenamespace - The namespace patternKeyPattern instance@NotNull static @NotNull KeyPattern ofValue(@Nullable @Nullable java.util.regex.Pattern value)
KeyPattern instance
that will filter keys using the specified
value pattern and will apply to every namespacevalue - The value patternKeyPattern instance@NotNull static @NotNull KeyPattern ofValue(@RegExp @Nullable @Nullable java.lang.String value)
KeyPattern instance
that will filter keys using the specified
value pattern and will apply to every namespacevalue - The value patternKeyPattern instance@NotNull static @NotNull KeyPattern any()
KeyPattern instance
that will filter any file