Class ArgumentTypes
java.lang.Object
studio.mevera.imperat.command.arguments.type.ArgumentTypes
-
Method Summary
Modifier and TypeMethodDescriptionstatic <S extends CommandSource,E>
ArrayArgument<S,E> static <S extends CommandSource>
BooleanArgument<S>bool()static <S extends CommandSource>
CharacterArgument<S>static <S extends CommandSource,E, C extends Collection<E>>
CollectionArgument<S,E, C> collection(TypeWrap<C> type, Supplier<C> collectionSupplier, ArgumentType<S, E> componentResolver) static <S extends CommandSource>
@NotNull CommandArgument<S>static <S extends CommandSource,A, B>
EitherArgument<S,A, B> static <S extends CommandSource>
FlagArgumentType<S>static <S extends CommandSource,T>
CompletableFutureArgument<S,T> future(TypeWrap<CompletableFuture<T>> typeWrap, ArgumentType<S, T> resolverType) static <S extends CommandSource,K, V, M extends Map<K, V>>
MapArgument<S,K, V, M> map(TypeWrap<M> type, Supplier<M> mapInitializer, ArgumentType<S, K> keyResolver, ArgumentType<S, V> valueResolver) static <S extends CommandSource,N extends Number>
NumberArgument<S,N> static <S extends CommandSource,T>
OptionalArgument<S,T> optional(TypeWrap<Optional<T>> typeWrap, ArgumentType<S, T> resolverType) static <S extends CommandSource>
StringArgument<S>string()static <S extends CommandSource>
UUIDArgument<S>uuid()
-
Method Details
-
string
-
character
-
numeric
public static <S extends CommandSource,N extends Number> NumberArgument<S,N> numeric(Class<N> numType) -
bool
-
flag
-
command
@NotNull public static <S extends CommandSource> @NotNull CommandArgument<S> command(Command<S> command) -
uuid
-
array
public static <S extends CommandSource,E> ArrayArgument<S,E> array(TypeWrap<E[]> type, Function<Integer, Object[]> initializer, ArgumentType<S, E> componentType) -
collection
public static <S extends CommandSource,E, CollectionArgument<S,C extends Collection<E>> E, collectionC> (TypeWrap<C> type, Supplier<C> collectionSupplier, ArgumentType<S, E> componentResolver) -
map
public static <S extends CommandSource,K, MapArgument<S,V, M extends Map<K, V>> K, mapV, M> (TypeWrap<M> type, Supplier<M> mapInitializer, ArgumentType<S, K> keyResolver, ArgumentType<S, V> valueResolver) -
future
public static <S extends CommandSource,T> CompletableFutureArgument<S,T> future(TypeWrap<CompletableFuture<T>> typeWrap, ArgumentType<S, T> resolverType) -
optional
public static <S extends CommandSource,T> OptionalArgument<S,T> optional(TypeWrap<Optional<T>> typeWrap, ArgumentType<S, T> resolverType) -
either
public static <S extends CommandSource,A, EitherArgument<S,B> A, eitherB> (TypeWrap<Either<A, B>> typeWrap, TypeWrap<A> typeA, TypeWrap<B> typeB)
-