Class CommandFlag.Builder<T>
- java.lang.Object
-
- cloud.commandframework.arguments.flags.CommandFlag.Builder<T>
-
- Enclosing class:
- CommandFlag<T>
public static final class CommandFlag.Builder<T> extends java.lang.Object
-
-
Method Summary
Modifier and Type Method Description @NonNull CommandFlag<T>build()Build a new command flag instanceCommandFlag.Builder<T>withAliases(@NonNull java.lang.String... aliases)Create a new builder instance using the given flag aliases.<N> CommandFlag.Builder<N>withArgument(@NonNull CommandArgument.Builder<?,N> builder)Create a new builder instance using the given command argument<N> CommandFlag.Builder<N>withArgument(@NonNull CommandArgument<?,N> argument)Create a new builder instance using the given command argumentCommandFlag.Builder<T>withDescription(@NonNull Description description)Create a new builder instance using the given flag description
-
-
-
Method Detail
-
withAliases
public CommandFlag.Builder<T> withAliases(@NonNull java.lang.String... aliases)
Create a new builder instance using the given flag aliases. These may at most be one character in length- Parameters:
aliases- Flag aliases- Returns:
- New builder instance
-
withDescription
public CommandFlag.Builder<T> withDescription(@NonNull Description description)
Create a new builder instance using the given flag description- Parameters:
description- Flag description- Returns:
- New builder instance
-
withArgument
public <N> CommandFlag.Builder<N> withArgument(@NonNull CommandArgument<?,N> argument)
Create a new builder instance using the given command argument- Type Parameters:
N- New argument type- Parameters:
argument- Command argument- Returns:
- New builder instance
-
withArgument
public <N> CommandFlag.Builder<N> withArgument(@NonNull CommandArgument.Builder<?,N> builder)
Create a new builder instance using the given command argument- Type Parameters:
N- New argument type- Parameters:
builder- Command argument builder.CommandArgument.Builder.build()will be invoked.- Returns:
- New builder instance
-
build
public @NonNull CommandFlag<T> build()
Build a new command flag instance- Returns:
- Constructed instance
-
-