| Modifier and Type | Field and Description |
|---|---|
static NodeType<ChatMetaNode<?,?>> |
CHAT_META
Node type for
ChatMetaNode. |
static NodeType<DisplayNameNode> |
DISPLAY_NAME
Node type for
DisplayNameNode. |
static NodeType<InheritanceNode> |
INHERITANCE
Node type for
InheritanceNode. |
static NodeType<MetaNode> |
META
Node type for
MetaNode. |
static NodeType<Node> |
META_OR_CHAT_META
Node type for
ChatMetaNode or MetaNode. |
static NodeType<PermissionNode> |
PERMISSION
Node type for
PermissionNode. |
static NodeType<PrefixNode> |
PREFIX
Node type for
PrefixNode. |
static NodeType<RegexPermissionNode> |
REGEX_PERMISSION
Node type for
RegexPermissionNode. |
static NodeType<SuffixNode> |
SUFFIX
Node type for
SuffixNode. |
static NodeType<WeightNode> |
WEIGHT
Node type for
WeightNode. |
| Modifier and Type | Method and Description |
|---|---|
T |
cast(Node node)
|
boolean |
matches(Node node)
Returns if the passed node matches the type
|
String |
name()
Gets a name for the node type.
|
default Predicate<Node> |
predicate()
|
default Predicate<Node> |
predicate(Predicate<? super T> and)
|
default Optional<T> |
tryCast(Node node)
|
static final NodeType<PermissionNode> PERMISSION
PermissionNode.static final NodeType<RegexPermissionNode> REGEX_PERMISSION
RegexPermissionNode.static final NodeType<InheritanceNode> INHERITANCE
InheritanceNode.static final NodeType<PrefixNode> PREFIX
PrefixNode.static final NodeType<SuffixNode> SUFFIX
SuffixNode.static final NodeType<WeightNode> WEIGHT
WeightNode.static final NodeType<DisplayNameNode> DISPLAY_NAME
DisplayNameNode.static final NodeType<ChatMetaNode<?,?>> CHAT_META
ChatMetaNode.static final NodeType<Node> META_OR_CHAT_META
ChatMetaNode or MetaNode.String name()
boolean matches(Node node)
node - the node to testT cast(Node node)
Node to the type defined by the NodeType.
An IllegalArgumentException is thrown if the node to cast does
not match the type.
node - the node to castIllegalArgumentException - if the node to cast does not match the typedefault Optional<T> tryCast(Node node)
Node to the type defined by the
NodeType.
Returns an empty optional if the node to cast
does not match the type.
node - the node to castdefault Predicate<Node> predicate()
matches(Node) method.default Predicate<Node> predicate(Predicate<? super T> and)
Predicate, returning whether a Node
matches this type, and passes the given
and Predicate.and - a predicate to AND with the result of the type match check