Class FlagSet

java.lang.Object
com.github.alex1304.ultimategdbot.api.command.FlagSet

public class FlagSet
extends Object
Contains the set of flags used in a command. A flag is defined by a name and an optional value.
  • Constructor Details

  • Method Details

    • builder

      public static FlagSet.FlagSetBuilder builder()
      Creates a builder to configure a new set of flags.
      Returns:
      a flag builder
    • get

      public Optional<String> get​(String name)
      Gets the value of the flag with the given name. If the flag has no value, the value is an empty string. If the flag is not present at all, and empty Optional is returned.
      Parameters:
      name - the name of the flag to look for
      Returns:
      the value of the flag, or empty optional if flag is not present
    • toString

      public String toString()
      Overrides:
      toString in class Object