Class ParameterNode<S extends Source,T extends CommandParameter<S>>
java.lang.Object
studio.mevera.imperat.command.tree.ParameterNode<S,T>
- Direct Known Subclasses:
ArgumentNode,CommandNode
-
Field Summary
Fields -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedParameterNode(@Nullable ParameterNode<S, ?> parent, T data, int depth, @Nullable CommandUsage<S> executableUsage) -
Method Summary
Modifier and TypeMethodDescriptionvoidaddChild(ParameterNode<S, ?> node) voidaddSupportedType(ParameterType<S, ?> type) static <S extends Source>
ArgumentNode<S>createArgumentNode(ParameterNode<S, ?> parent, CommandParameter<S> data, int depth, @Nullable CommandUsage<S> executableUsage) static <S extends Source>
CommandNode<S>createCommandNode(@Nullable ParameterNode<S, ?> parent, @NotNull Command<S> data, int depth, @Nullable CommandUsage<S> executableUsage) booleanabstract Stringformat()@Nullable ParameterNode<S,?> getChild(Predicate<ParameterNode<S, ?>> predicate) LinkedList<ParameterNode<S,?>> intgetData()intgetDepth()@Nullable CommandUsage<S>ParameterNode<S,?> ParameterNode<S,?> @Nullable ParameterNode<S,?> @Nullable ParameterType<S,?> Deque<ParameterType<S,?>> @Nullable ParameterNode<S,?> inthashCode()booleanbooleanbooleanisFlag()booleanbooleanisLast()booleanbooleanbooleanisRoot()booleanbooleanmatchesInput(int depth, Context<S> ctx) booleanmatchesInput(int depth, Context<S> ctx, boolean strict) abstract intpriority()voidremoveSupportedType(ParameterType<S, ?> type) voidsetExecutableUsage(@Nullable CommandUsage<S> executableUsage) voidsetPermission(String permission)
-
Field Details
-
data
-
executableUsage
-
-
Constructor Details
-
ParameterNode
protected ParameterNode(@Nullable @Nullable ParameterNode<S, ?> parent, @NotNull T data, int depth, @Nullable @Nullable CommandUsage<S> executableUsage)
-
-
Method Details
-
createCommandNode
public static <S extends Source> CommandNode<S> createCommandNode(@Nullable @Nullable ParameterNode<S, ?> parent, @NotNull @NotNull Command<S> data, int depth, @Nullable @Nullable CommandUsage<S> executableUsage) -
createArgumentNode
public static <S extends Source> ArgumentNode<S> createArgumentNode(ParameterNode<S, ?> parent, CommandParameter<S> data, int depth, @Nullable @Nullable CommandUsage<S> executableUsage) -
getPermission
-
setPermission
-
getDepth
public int getDepth() -
getExecutableUsage
-
setExecutableUsage
-
isExecutable
public boolean isExecutable() -
getData
-
addChild
-
getChildren
-
matchesInput
-
matchesInput
-
addSupportedType
-
removeSupportedType
-
getSupportedTypes
-
getPrimaryType
-
format
-
isLast
public boolean isLast() -
priority
public abstract int priority() -
isGreedyParam
public boolean isGreedyParam() -
isOptional
public boolean isOptional() -
getChild
-
getNextCommandChild
-
getNextParameterChild
-
isRequired
public boolean isRequired() -
isCommand
public boolean isCommand() -
isTrueFlag
public boolean isTrueFlag() -
isFlag
public boolean isFlag() -
getParent
-
getTopChild
-
isRoot
public boolean isRoot() -
getConsumedArguments
public int getConsumedArguments() -
equals
-
hashCode
public int hashCode()
-