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 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 a CompletionCache record class.
      Parameters:
      suggestionProvider - the value for the suggestionProvider record component
      visibleFlags - the value for the visibleFlags record component
      flagLookup - the value for the flagLookup record component
      optionalOverlapDescendants - the value for the optionalOverlapDescendants record component
      literalChildren - the value for the literalChildren record component
      nonLiteralChildren - the value for the nonLiteralChildren record component
      literalChildLookup - the value for the literalChildLookup record component
  • Method Details

    • empty

      @NotNull public static <S extends CommandSource> @NotNull CommandNode.CompletionCache<S> empty()
    • toString

      public final String 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.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • 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.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      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 with Objects::equals(Object,Object).
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • suggestionProvider

      @NotNull public @NotNull SuggestionProvider<S> suggestionProvider()
      Returns the value of the suggestionProvider record component.
      Returns:
      the value of the suggestionProvider record component
    • visibleFlags

      @NotNull public @NotNull List<FlagArgument<S>> visibleFlags()
      Returns the value of the visibleFlags record component.
      Returns:
      the value of the visibleFlags record component
    • flagLookup

      @NotNull public @NotNull Map<String,FlagArgument<S>> flagLookup()
      Returns the value of the flagLookup record component.
      Returns:
      the value of the flagLookup record component
    • optionalOverlapDescendants

      @NotNull public @NotNull List<CommandNode<S,?>> optionalOverlapDescendants()
      Returns the value of the optionalOverlapDescendants record component.
      Returns:
      the value of the optionalOverlapDescendants record component
    • literalChildren

      @NotNull public @NotNull List<CommandNode<S,?>> literalChildren()
      Returns the value of the literalChildren record component.
      Returns:
      the value of the literalChildren record component
    • nonLiteralChildren

      @NotNull public @NotNull List<CommandNode<S,?>> nonLiteralChildren()
      Returns the value of the nonLiteralChildren record component.
      Returns:
      the value of the nonLiteralChildren record component
    • literalChildLookup

      @NotNull public @NotNull Map<String,List<CommandNode<S,?>>> literalChildLookup()
      Returns the value of the literalChildLookup record component.
      Returns:
      the value of the literalChildLookup record component