Class StringConverter
- java.lang.Object
-
- com.github.alex1304.ultimategdbot.api.command.annotated.paramconverter.StringConverter
-
- All Implemented Interfaces:
ParamConverter<String>
public class StringConverter extends Object implements ParamConverter<String>
-
-
Constructor Summary
Constructors Constructor Description StringConverter()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description reactor.core.publisher.Mono<String>
convert(Context ctx, String input)
Accepts a String input and parses it into an object of type T.Class<String>
type()
Returns the type of object resulting of the parsing.
-
-
-
Method Detail
-
convert
public reactor.core.publisher.Mono<String> convert(Context ctx, String input)
Description copied from interface:ParamConverter
Accepts a String input and parses it into an object of type T. This method has asynchronous capabilities, and may error to indicate that it cannot be parsed to the desired object. An empty mono may represent the fact that an argument is optional, ignored or non applicable.- Specified by:
convert
in interfaceParamConverter<String>
- Parameters:
ctx
- the context of a command that may influence the parsing processinput
- the input to parse- Returns:
- a Mono emittng the result of the parsing, a error if the parsing fails, or empty if non applicable or not provided.
-
type
public Class<String> type()
Description copied from interface:ParamConverter
Returns the type of object resulting of the parsing.- Specified by:
type
in interfaceParamConverter<String>
- Returns:
- a Class
-
-