Record Class FlagValueParser<C>

java.lang.Object
java.lang.Record
org.empirewar.orbis.command.parser.FlagValueParser<C>
All Implemented Interfaces:
org.incendo.cloud.parser.ArgumentParser<C,FlagValue<?>>, org.incendo.cloud.parser.ArgumentParser.FutureArgumentParser<C,FlagValue<?>>, org.incendo.cloud.suggestion.SuggestionProvider<C>, org.incendo.cloud.suggestion.SuggestionProviderHolder<C>

public record FlagValueParser<C>(org.incendo.cloud.CommandManager<C> manager) extends Record implements org.incendo.cloud.parser.ArgumentParser.FutureArgumentParser<C,FlagValue<?>>, org.incendo.cloud.suggestion.SuggestionProvider<C>
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Class
    Description
    static final class 
     

    Nested classes/interfaces inherited from interface org.incendo.cloud.parser.ArgumentParser

    org.incendo.cloud.parser.ArgumentParser.FutureArgumentParser<C,T>
  • Constructor Summary

    Constructors
    Constructor
    Description
    FlagValueParser(org.incendo.cloud.CommandManager<C> manager)
    Creates an instance of a FlagValueParser record class.
  • Method Summary

    Modifier and Type
    Method
    Description
    final boolean
    Indicates whether some other object is "equal to" this one.
    final int
    Returns a hash code value for this object.
    org.incendo.cloud.CommandManager<C>
    Returns the value of the manager record component.
    @NonNull CompletableFuture<@NonNull org.incendo.cloud.parser.ArgumentParseResult<FlagValue<?>>>
    parseFuture(@NonNull org.incendo.cloud.context.CommandContext<@NonNull C> commandContext, @NonNull org.incendo.cloud.context.CommandInput commandInput)
     
    @NonNull CompletableFuture<? extends @NonNull Iterable<? extends @NonNull org.incendo.cloud.suggestion.Suggestion>>
    suggestionsFuture(@NonNull org.incendo.cloud.context.CommandContext<C> context, @NonNull org.incendo.cloud.context.CommandInput input)
     
    final String
    Returns a string representation of this record class.

    Methods inherited from class java.lang.Object

    clone, finalize, getClass, notify, notifyAll, wait, wait, wait

    Methods inherited from interface org.incendo.cloud.parser.ArgumentParser

    flatMap, flatMapSuccess, mapSuccess, suggestionProvider

    Methods inherited from interface org.incendo.cloud.parser.ArgumentParser.FutureArgumentParser

    parse
  • Constructor Details

    • FlagValueParser

      public FlagValueParser(org.incendo.cloud.CommandManager<C> manager)
      Creates an instance of a FlagValueParser record class.
      Parameters:
      manager - the value for the manager record component
  • Method Details

    • parseFuture

      public @NonNull CompletableFuture<@NonNull org.incendo.cloud.parser.ArgumentParseResult<FlagValue<?>>> parseFuture(@NonNull org.incendo.cloud.context.CommandContext<@NonNull C> commandContext, @NonNull org.incendo.cloud.context.CommandInput commandInput)
      Specified by:
      parseFuture in interface org.incendo.cloud.parser.ArgumentParser<C,FlagValue<?>>
      Specified by:
      parseFuture in interface org.incendo.cloud.parser.ArgumentParser.FutureArgumentParser<C,FlagValue<?>>
    • suggestionsFuture

      public @NonNull CompletableFuture<? extends @NonNull Iterable<? extends @NonNull org.incendo.cloud.suggestion.Suggestion>> suggestionsFuture(@NonNull org.incendo.cloud.context.CommandContext<C> context, @NonNull org.incendo.cloud.context.CommandInput input)
      Specified by:
      suggestionsFuture in interface org.incendo.cloud.suggestion.SuggestionProvider<C>
    • 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.
    • manager

      public org.incendo.cloud.CommandManager<C> manager()
      Returns the value of the manager record component.
      Returns:
      the value of the manager record component