Uses of Interface
dev.sympho.modular_commands.api.command.parameter.parse.ParserFunction
Packages that use ParserFunction
Package
Description
Interfaces defining how received arguments are parsed.
Parsing utilities.
Parsers for Discord entities.
-
Uses of ParserFunction in dev.sympho.modular_commands.api.command.parameter.parse
Classes in dev.sympho.modular_commands.api.command.parameter.parse with type parameters of type ParserFunctionModifier and TypeClassDescriptionstatic classParserFunction.PostParser<R extends @NonNull Object,I extends @NonNull Object, T extends @NonNull Object, P1 extends @NonNull ParserFunction<R, I>, P2 extends @NonNull ParserFunction<I, T>> A composed parser that first applies this parser to one parser, and then applies the results to a second parser.static classParserFunction.PostParser<R extends @NonNull Object,I extends @NonNull Object, T extends @NonNull Object, P1 extends @NonNull ParserFunction<R, I>, P2 extends @NonNull ParserFunction<I, T>> A composed parser that first applies this parser to one parser, and then applies the results to a second parser.Subinterfaces of ParserFunction in dev.sympho.modular_commands.api.command.parameter.parseModifier and TypeInterfaceDescriptioninterfaceArgumentParser<R extends @NonNull Object,T extends @NonNull Object> Parses received arguments into their actual value.interfaceAttachmentDataParser<T extends @NonNull Object>Parses received attachment arguments into their actual value.interfaceAttachmentParser<T extends @NonNull Object>Parses received attachment arguments into their actual value.interfaceBooleanParser<T extends @NonNull Object>Parses boolean-based input arguments.interfaceChannelArgumentParser<C extends Channel,T extends @NonNull Object> Parses Discord channels.interfaceChoicesParser<P extends @NonNull Object,T extends @NonNull Object> Parses received input arguments, potentially restricting the acceptable values to a set of choices.interfaceEntityArgumentParser<E extends @NonNull Entity,T extends @NonNull Object> Parses Discord entities.interfaceFloatParser<T extends @NonNull Object>Parses float-based input arguments.interfaceInputParser<P extends @NonNull Object,T extends @NonNull Object> Parses received input arguments.interfaceIntegerParser<T extends @NonNull Object>Parses integer-based input arguments.interfaceListParser<T extends @NonNull Object>A parser that extracts lists of objects by splitting a string argument and parsing each item.interfaceMessageArgumentParser<T extends @NonNull Object>Parses Discord messages.interfaceNumberParser<P extends @NonNull Number & Comparable<P>,T extends @NonNull Object> Parses number-based input arguments.static interfaceParsers.Functor<R extends @NonNull Object,T extends @NonNull Object> A parser that does not depend on the invocation context.static interfaceParsers.Simple<R extends @NonNull Object,T extends @NonNull Object> A parser that executes synchronously and does not depend on the invocation context.static interfaceParsers.Synchronous<R extends @NonNull Object,T extends @NonNull Object> A parser that executes synchronously.interfaceRoleArgumentParser<T extends @NonNull Object>Parses Discord roles.interfaceSnowflakeParser<T extends @NonNull Object>Parses snowflake-based input arguments.interfaceStringParser<T extends @NonNull Object>Parses string-based input arguments.interfaceTextFileParser<T extends @NonNull Object>Parses an argument from an attached text file.interfaceUserArgumentParser<T extends @NonNull Object>Parses Discord users.Classes in dev.sympho.modular_commands.api.command.parameter.parse that implement ParserFunctionModifier and TypeClassDescriptionstatic classParserFunction.PostParser<R extends @NonNull Object,I extends @NonNull Object, T extends @NonNull Object, P1 extends @NonNull ParserFunction<R, I>, P2 extends @NonNull ParserFunction<I, T>> A composed parser that first applies this parser to one parser, and then applies the results to a second parser.Fields in dev.sympho.modular_commands.api.command.parameter.parse declared as ParserFunctionModifier and TypeFieldDescriptionprotected final P1ParserFunction.PostParser.parserThe first parser to apply.protected final P2ParserFunction.PostParser.postParserThe second parser to apply.Methods in dev.sympho.modular_commands.api.command.parameter.parse that return ParserFunctionModifier and TypeMethodDescriptionstatic <R extends @NonNull Object,T extends @NonNull Object>
ParserFunction<R,T> Parsers.functor(Parsers.Functor<R, T> parser) Uses a parser that does not depend on the execution context.static <R extends @NonNull Object>
ParserFunction<R,R> Parsers.nullValue(R value) Creates a parser that returns an empty result for the given value, otherwise resulting in the raw value.static <R extends @NonNull Object,T extends @NonNull Object>
ParserFunction<R,T> Parsers.nullValue(R value, ParserFunction<R, T> parser) Creates a parser that returns an empty result for the given value, otherwise deferring to the given parser.static <R extends @NonNull Object>
ParserFunction<R,R> Parsers.nullValues(Collection<? extends R> values) Creates a parser that returns an empty result for the given values, otherwise resulting in the raw value.static <R extends @NonNull Object,T extends @NonNull Object>
ParserFunction<R,T> Parsers.nullValues(Collection<? extends R> values, ParserFunction<R, T> parser) Creates a parser that returns an empty result for the given values, otherwise deferring to the given parser.static <R extends @NonNull Object,T extends @NonNull Object>
ParserFunction<R,T> Parsers.simple(Parsers.Simple<R, T> parser) Uses a parser that executes synchronously and does not depend on the execution context.static <R extends @NonNull Object,T extends @NonNull Object>
ParserFunction<R,T> Parsers.sync(Parsers.Synchronous<R, T> parser) Uses a parser that executes synchronously.default <V extends @NonNull Object>
ParserFunction<R,V> ParserFunction.then(ParserFunction<T, V> after) Returns a composed parser that first applies this parser to its input, and then applies the after parser to the result.Methods in dev.sympho.modular_commands.api.command.parameter.parse with parameters of type ParserFunctionModifier and TypeMethodDescriptionstatic <T extends @NonNull Object>
AttachmentParser<T>Parsers.attachment(ParserFunction<Attachment, T> parser) Creates a parser that uses the given function to parse received values.static <T extends @NonNull Object>
BooleanParser<T>Parsers.bool(ParserFunction<Boolean, T> parser) Creates a parser that uses the given function to parse received values.static <C extends @NonNull Channel,T extends @NonNull Object>
ChannelArgumentParser<C,T> Parsers.channel(Class<C> type, ParserFunction<C, T> parser) Creates a parser that uses the given function to parse received values.static <T extends @NonNull Object>
SnowflakeParser<T>Parsers.channelId(ParserFunction<Snowflake, T> parser) Creates a parser that uses the given function to parse received values.static <T extends @NonNull Object>
IntegerParser<T>Parsers.integer(ParserFunction<Long, T> parser) Creates a parser that uses the given function to parse received values.static <T extends @NonNull Object>
IntegerParser<T>Parsers.integerAbove(long minimum, ParserFunction<Long, T> parser) Creates a parser that uses the given function to parse received values, which must be at least the given value.static <T extends @NonNull Object>
IntegerParser<T>Parsers.integerBelow(long maximum, ParserFunction<Long, T> parser) Creates a parser that uses the given function to parse received values, which must be at most the given value.static <T extends @NonNull Object>
IntegerParser<T>Parsers.integerBetween(long minimum, long maximum, ParserFunction<Long, T> parser) Creates a parser that uses the given function to parse received values, which must be between the given values.static <T extends @NonNull Object>
ListParser<T>Parsers.list(ParserFunction<String, T> parser) Creates a list parser that uses the given function to parse items.static <T extends @NonNull Object>
ListParser<T>Parsers.list(ParserFunction<String, T> parser, @org.checkerframework.common.value.qual.IntRange(from=0L, to=2147483647L) int minItems, @org.checkerframework.common.value.qual.IntRange(from=1L, to=2147483647L) int maxItems) Creates a list parser that uses the given function to parse items.static <T extends @NonNull Object>
MessageArgumentParser<T>Parsers.message(ParserFunction<Message, T> parser) Creates a parser that uses the given function to parse received values.static <R extends @NonNull Object,T extends @NonNull Object>
ParserFunction<R,T> Parsers.nullValue(R value, ParserFunction<R, T> parser) Creates a parser that returns an empty result for the given value, otherwise deferring to the given parser.static <R extends @NonNull Object,T extends @NonNull Object>
ParserFunction<R,T> Parsers.nullValues(Collection<? extends R> values, ParserFunction<R, T> parser) Creates a parser that returns an empty result for the given values, otherwise deferring to the given parser.static <T extends @NonNull Object>
FloatParser<T>Parsers.number(ParserFunction<Double, T> parser) Creates a parser that uses the given function to parse received values.static <T extends @NonNull Object>
FloatParser<T>Parsers.numberAbove(double minimum, ParserFunction<Double, T> parser) Creates a parser that uses the given function to parse received values, which must be at least the given value.static <T extends @NonNull Object>
FloatParser<T>Parsers.numberBelow(double maximum, ParserFunction<Double, T> parser) Creates a parser that uses the given function to parse received values, which must be at most the given value.static <T extends @NonNull Object>
FloatParser<T>Parsers.numberBetween(double minimum, double maximum, ParserFunction<Double, T> parser) Creates a parser that uses the given function to parse received values, which must be between the given values.static <T extends @NonNull Object>
RoleArgumentParser<T>Parsers.role(ParserFunction<Role, T> parser) Creates a parser that uses the given function to parse received values.static <T extends @NonNull Object>
SnowflakeParser<T>Parsers.roleId(ParserFunction<Snowflake, T> parser) Creates a parser that uses the given function to parse received values.static <T extends @NonNull Object>
SnowflakeParser<T>Parsers.snowflake(ParserFunction<Snowflake, T> parser) Creates a parser that uses the given function to parse received values.static <T extends @NonNull Object>
StringParser<T>Parsers.string(ParserFunction<String, T> parser) Creates a parser that uses the given function to parse received values.static <T extends @NonNull Object>
StringParser<T>Parsers.string(ParserFunction<String, T> parser, @Nullable @IntRange(from=0L,to=6000L) Integer minLength, @Nullable @IntRange(from=1L,to=6000L) Integer maxLength) Creates a parser that uses the given function to parse received values.static <T extends @NonNull Object>
StringParser<T>Parsers.text(ParserFunction<String, T> parser) Creates a parser that uses the given function to parse received values.static <T extends @NonNull Object>
StringParser<T>Parsers.text(ParserFunction<String, T> parser, @Nullable @IntRange(from=0L,to=6000L) Integer minLength, @Nullable @IntRange(from=1L,to=6000L) Integer maxLength) Creates a parser that uses the given function to parse received values.static <T extends @NonNull Object>
TextFileParser<T>Parsers.textFile(@org.checkerframework.common.value.qual.IntRange(from=0L) int maxSize, ParserFunction<String, T> parser) Creates a parser that uses the given parser to parse the contents received in a text file.static <T extends @NonNull Object>
TextFileParser<T>Parsers.textFile(ParserFunction<String, T> parser) Creates a parser that uses the given parser to parse the contents received in a text file, with unbounded file size.default <V extends @NonNull Object>
ParserFunction<R,V> ParserFunction.then(ParserFunction<T, V> after) Returns a composed parser that first applies this parser to its input, and then applies the after parser to the result.static <T extends @NonNull Object>
UserArgumentParser<T>Parsers.user(ParserFunction<User, T> parser) Creates a parser that uses the given function to parse received values.static <T extends @NonNull Object>
SnowflakeParser<T>Parsers.userId(ParserFunction<Snowflake, T> parser) Creates a parser that uses the given function to parse received values. -
Uses of ParserFunction in dev.sympho.modular_commands.utils.parse
Classes in dev.sympho.modular_commands.utils.parse with type parameters of type ParserFunctionModifier and TypeClassDescriptionstatic classUrlParser.PostParser<I extends @NonNull Object,T extends @NonNull Object, P1 extends @NonNull UrlParser<I>, P2 extends @NonNull ParserFunction<I, T>> A composed parser that first applies this parser to one parser, and then applies the results to a second parser.Subinterfaces of ParserFunction in dev.sympho.modular_commands.utils.parseModifier and TypeInterfaceDescriptioninterfaceFunctorUrlParser<T extends @NonNull Object>A parser for URL-based arguments that are independent from the invocation context.interfaceA parser wrapper that tolerates errors by returning a result that reports either the parsed item or an encountered error.interfaceA parser for URL-based arguments.Classes in dev.sympho.modular_commands.utils.parse that implement ParserFunctionModifier and TypeClassDescriptionstatic classFunctorUrlParser.Choice<T extends @NonNull Object>Parser that supports multiple URL types by delegating to one of a list of parsers.static classFunctorUrlParser.ChoiceBase<T extends @NonNull Object,P extends FunctorUrlParser<T>> Base for a parser that supports multiple URL types by delegating to one of a list of parsers.static classFunctorUrlParser.PostParser<I extends @NonNull Object,T extends @NonNull Object, P1 extends @NonNull FunctorUrlParser<I>, P2 extends @NonNull Parsers.Functor<I, T>> A composed parser that first applies this parser to one parser, and then applies the results to a second parser.final recordStringAdapter<R extends @NonNull Object,T extends @NonNull Object> Adapter that converts an existing parser into a string parser, by first pre-parsing the string into another raw type.static classUrlParser.Choice<T extends @NonNull Object>Parser that supports multiple URL types by delegating to one of a list of parsers.static classUrlParser.ChoiceBase<T extends @NonNull Object,P extends UrlParser<T>> Base for a parser that supports multiple URL types by delegating to one of a list of parsers.static classUrlParser.PostParser<I extends @NonNull Object,T extends @NonNull Object, P1 extends @NonNull UrlParser<I>, P2 extends @NonNull ParserFunction<I, T>> A composed parser that first applies this parser to one parser, and then applies the results to a second parser.Fields in dev.sympho.modular_commands.utils.parse declared as ParserFunctionModifier and TypeFieldDescriptionstatic final ParserFunction<String,Boolean> ParseUtils.BOOLEANParser for booleans from strings.static final ParserFunction<String,Snowflake> ParseUtils.CHANNEL_IDParser for channel IDs from strings.static final ParserFunction<String,Double> ParseUtils.FLOATParser for floats from strings.static final ParserFunction<String,Long> ParseUtils.INTEGERParser for integers from strings.static final ParserFunction<String,Snowflake> ParseUtils.MESSAGE_IDParser for message IDs from strings.static final ParserFunction<String,Snowflake> ParseUtils.ROLE_IDParser for role IDs from strings.static final ParserFunction<String,Snowflake> ParseUtils.SNOWFLAKEParser for snowflakes from strings.static final ParserFunction<String,Snowflake> ParseUtils.USER_IDParser for user IDs from strings.Methods in dev.sympho.modular_commands.utils.parse that return ParserFunctionModifier and TypeMethodDescriptionstatic <C extends Channel,T extends @NonNull Object>
ParserFunction<String,T> ParseUtils.adaptChannel(ParserFunction<C, T> parser, Class<C> type) Creates an adapter for a channel parser to be used with string values.static <T extends @NonNull Object>
ParserFunction<String,T> ParseUtils.adaptFloat(ParserFunction<Double, T> parser) Creates an adapter for an float parser to be used with string values.static <T extends @NonNull Object>
ParserFunction<String,T> ParseUtils.adaptInteger(ParserFunction<Long, T> parser) Creates an adapter for an integer parser to be used with string values.static <T extends @NonNull Object>
ParserFunction<String,T> ParseUtils.adaptMessage(ParserFunction<Message, T> parser) Creates an adapter for a message parser to be used with string values.static <T extends @NonNull Object>
ParserFunction<String,T> ParseUtils.adaptRole(ParserFunction<Role, T> parser) Creates an adapter for a role parser to be used with string values.static <T extends @NonNull Object>
ParserFunction<String,T> ParseUtils.adaptSnowflake(ParserFunction<Snowflake, T> parser) Creates an adapter for a snowflake parser to be used with string values.static <T extends @NonNull Object>
ParserFunction<String,T> ParseUtils.adaptUser(ParserFunction<User, T> parser) Creates an adapter for an user parser to be used with string values.TryParser.parser()The parser to delegate to.StringAdapter.rawParser()Returns the value of therawParserrecord component.StringAdapter.valueParser()Returns the value of thevalueParserrecord component.Methods in dev.sympho.modular_commands.utils.parse with parameters of type ParserFunctionModifier and TypeMethodDescriptionstatic <C extends Channel,T extends @NonNull Object>
ParserFunction<String,T> ParseUtils.adaptChannel(ParserFunction<C, T> parser, Class<C> type) Creates an adapter for a channel parser to be used with string values.static <T extends @NonNull Object>
ParserFunction<String,T> ParseUtils.adaptFloat(ParserFunction<Double, T> parser) Creates an adapter for an float parser to be used with string values.static <T extends @NonNull Object>
ParserFunction<String,T> ParseUtils.adaptInteger(ParserFunction<Long, T> parser) Creates an adapter for an integer parser to be used with string values.static <T extends @NonNull Object>
ParserFunction<String,T> ParseUtils.adaptMessage(ParserFunction<Message, T> parser) Creates an adapter for a message parser to be used with string values.static <T extends @NonNull Object>
ParserFunction<String,T> ParseUtils.adaptRole(ParserFunction<Role, T> parser) Creates an adapter for a role parser to be used with string values.static <T extends @NonNull Object>
ParserFunction<String,T> ParseUtils.adaptSnowflake(ParserFunction<Snowflake, T> parser) Creates an adapter for a snowflake parser to be used with string values.static <T extends @NonNull Object>
ParserFunction<String,T> ParseUtils.adaptUser(ParserFunction<User, T> parser) Creates an adapter for an user parser to be used with string values.static <T extends @NonNull Object>
StringParser<Flux<T>>ParseUtils.flux(ParserFunction<String, Mono<T>> parser) A parser that generates a flux by using the defaultlist parserto split the raw argument, then the given item parser to convert each item into a mono, which are then merged.TryParser.of(ParserFunction<R, T> parser) Creates a try-parser wrapper the given parser.UrlParser.then(ParserFunction<T, V> after) Returns a composed parser that first applies this parser to its input, and then applies the after parser to the result.Constructors in dev.sympho.modular_commands.utils.parse with parameters of type ParserFunctionModifierConstructorDescriptionStringAdapter(ParserFunction<String, R> rawParser, ParserFunction<R, T> valueParser) Creates an instance of aStringAdapterrecord class. -
Uses of ParserFunction in dev.sympho.modular_commands.utils.parse.entity
Classes in dev.sympho.modular_commands.utils.parse.entity that implement ParserFunctionModifier and TypeClassDescriptionclassChannelMentionParser<C extends @NonNull Channel>A parser for channel mentions.classChannelParser<C extends @NonNull Channel>A parser that extracts a channel from a string.classChannelRefMentionParser<C extends Channel>A parser for channel mentions to references.classChannelRefParser<C extends @NonNull Channel>A parser that extracts a channel reference from a string.classChannelRefUrlParser<C extends @NonNull Channel>A reference parser for channel URLs.classChannelUrlParser<C extends @NonNull Channel>A parser for channel URLs.classEntityMentionParser<E extends @NonNull Entity>A parser for mentions of Discord entities.classEntityParser<E extends @NonNull Entity>A parser that extracts an entity from a string.classEntityRefMentionParser<R extends EntityRef<? extends @NonNull Entity>>A parser for mentions of Discord entities to references.classEntityRefParser<R extends EntityRef<? extends @NonNull Entity>>A parser that extracts an entity reference from a string.classEntityRefUrlParser<R extends EntityRef<? extends @NonNull Entity>>A parser for URLs of Discord entities to references.classEntityUrlParser<E extends @NonNull Entity>A parser for URLs of Discord entities.classA parser that extracts a message from a string.classA parser that extracts a message reference from a string.classA parser for message URLs.classA parser for message URLs.classA parser for role mentions.classA parser that extracts a role from a string.classA parser for user mentions to references.classA parser that extracts a role reference from a string.classA parser for user mentions.classA parser that extracts an user from a string.classA parser for user mentions to references.classA parser that extracts a user reference from a string.