Record Class CommandNode.CompletionCache<S extends CommandSource>
java.lang.Object
java.lang.Record
studio.mevera.imperat.command.tree.CommandNode.CompletionCache<S>
- Enclosing class:
- CommandNode<S extends CommandSource,
T extends Argument<S>>
public static record CommandNode.CompletionCache<S extends CommandSource>(@NotNull SuggestionProvider<S extends CommandSource> suggestionProvider, @NotNull List<FlagArgument<S extends CommandSource>> visibleFlags, @NotNull Map<String,FlagArgument<S extends CommandSource>> flagLookup, @NotNull List<CommandNode<S extends CommandSource,?>> optionalOverlapDescendants, @NotNull List<CommandNode<S extends CommandSource,?>> literalChildren, @NotNull List<CommandNode<S extends CommandSource,?>> nonLiteralChildren, @NotNull Map<String,List<CommandNode<S extends CommandSource,?>>> literalChildLookup)
extends Record
-
Constructor Summary
ConstructorsConstructorDescriptionCompletionCache(@NotNull SuggestionProvider<S> suggestionProvider, @NotNull List<FlagArgument<S>> visibleFlags, @NotNull Map<String, FlagArgument<S>> flagLookup, @NotNull List<CommandNode<S, ?>> optionalOverlapDescendants, @NotNull List<CommandNode<S, ?>> literalChildren, @NotNull List<CommandNode<S, ?>> nonLiteralChildren, @NotNull Map<String, List<CommandNode<S, ?>>> literalChildLookup) Creates an instance of aCompletionCacherecord class. -
Method Summary
Modifier and TypeMethodDescriptionstatic <S extends CommandSource>
@NotNull CommandNode.CompletionCache<S>empty()final booleanIndicates whether some other object is "equal to" this one.@NotNull Map<String,FlagArgument<S>> Returns the value of theflagLookuprecord component.final inthashCode()Returns a hash code value for this object.@NotNull Map<String,List<CommandNode<S, ?>>> Returns the value of theliteralChildLookuprecord component.@NotNull List<CommandNode<S,?>> Returns the value of theliteralChildrenrecord component.@NotNull List<CommandNode<S,?>> Returns the value of thenonLiteralChildrenrecord component.@NotNull List<CommandNode<S,?>> Returns the value of theoptionalOverlapDescendantsrecord component.@NotNull SuggestionProvider<S>Returns the value of thesuggestionProviderrecord component.final StringtoString()Returns a string representation of this record class.@NotNull List<FlagArgument<S>>Returns the value of thevisibleFlagsrecord component.
-
Constructor Details
-
CompletionCache
public CompletionCache(@NotNull @NotNull SuggestionProvider<S> suggestionProvider, @NotNull @NotNull List<FlagArgument<S>> visibleFlags, @NotNull @NotNull Map<String, FlagArgument<S>> flagLookup, @NotNull @NotNull List<CommandNode<S, ?>> optionalOverlapDescendants, @NotNull @NotNull List<CommandNode<S, ?>> literalChildren, @NotNull @NotNull List<CommandNode<S, ?>> nonLiteralChildren, @NotNull @NotNull Map<String, List<CommandNode<S, ?>>> literalChildLookup) Creates an instance of aCompletionCacherecord class.- Parameters:
suggestionProvider- the value for thesuggestionProviderrecord componentvisibleFlags- the value for thevisibleFlagsrecord componentflagLookup- the value for theflagLookuprecord componentoptionalOverlapDescendants- the value for theoptionalOverlapDescendantsrecord componentliteralChildren- the value for theliteralChildrenrecord componentnonLiteralChildren- the value for thenonLiteralChildrenrecord componentliteralChildLookup- the value for theliteralChildLookuprecord component
-
-
Method Details
-
empty
-
toString
Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components. -
hashCode
public final int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared withObjects::equals(Object,Object). -
suggestionProvider
Returns the value of thesuggestionProviderrecord component.- Returns:
- the value of the
suggestionProviderrecord component
-
visibleFlags
Returns the value of thevisibleFlagsrecord component.- Returns:
- the value of the
visibleFlagsrecord component
-
flagLookup
Returns the value of theflagLookuprecord component.- Returns:
- the value of the
flagLookuprecord component
-
optionalOverlapDescendants
Returns the value of theoptionalOverlapDescendantsrecord component.- Returns:
- the value of the
optionalOverlapDescendantsrecord component
-
literalChildren
Returns the value of theliteralChildrenrecord component.- Returns:
- the value of the
literalChildrenrecord component
-
nonLiteralChildren
Returns the value of thenonLiteralChildrenrecord component.- Returns:
- the value of the
nonLiteralChildrenrecord component
-
literalChildLookup
Returns the value of theliteralChildLookuprecord component.- Returns:
- the value of the
literalChildLookuprecord component
-