- java.lang.Object
-
- com.github.alex1304.ultimategdbot.api.command.FlagSet
-
public final class FlagSet extends Object
Contains the set of flags used in a command. A flag is defined by a name and an optional value.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
FlagSet.FlagSetBuilder
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static FlagSet.FlagSetBuilder
builder()
Creates a builder to configure a new set of flags.Optional<String>
get(String name)
Gets the value of the flag with the given name.String
toString()
-
-
-
Method Detail
-
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
-
-