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 class
ParserFunction.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 class
ParserFunction.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 TypeInterfaceDescriptioninterface
ArgumentParser<R extends @NonNull Object,
T extends @NonNull Object> Parses received arguments into their actual value.interface
AttachmentDataParser<T extends @NonNull Object>
Parses received attachment arguments into their actual value.interface
AttachmentParser<T extends @NonNull Object>
Parses received attachment arguments into their actual value.interface
BooleanParser<T extends @NonNull Object>
Parses boolean-based input arguments.interface
ChannelArgumentParser<C extends Channel,
T extends @NonNull Object> Parses Discord channels.interface
ChoicesParser<P extends @NonNull Object,
T extends @NonNull Object> Parses received input arguments, potentially restricting the acceptable values to a set of choices.interface
EntityArgumentParser<E extends @NonNull Entity,
T extends @NonNull Object> Parses Discord entities.interface
FloatParser<T extends @NonNull Object>
Parses float-based input arguments.interface
InputParser<P extends @NonNull Object,
T extends @NonNull Object> Parses received input arguments.interface
IntegerParser<T extends @NonNull Object>
Parses integer-based input arguments.interface
ListParser<T extends @NonNull Object>
A parser that extracts lists of objects by splitting a string argument and parsing each item.interface
MessageArgumentParser<T extends @NonNull Object>
Parses Discord messages.interface
NumberParser<P extends @NonNull Number & Comparable<P>,
T extends @NonNull Object> Parses number-based input arguments.static interface
Parsers.Functor<R extends @NonNull Object,
T extends @NonNull Object> A parser that does not depend on the invocation context.static interface
Parsers.Simple<R extends @NonNull Object,
T extends @NonNull Object> A parser that executes synchronously and does not depend on the invocation context.static interface
Parsers.Synchronous<R extends @NonNull Object,
T extends @NonNull Object> A parser that executes synchronously.interface
RoleArgumentParser<T extends @NonNull Object>
Parses Discord roles.interface
SnowflakeParser<T extends @NonNull Object>
Parses snowflake-based input arguments.interface
StringParser<T extends @NonNull Object>
Parses string-based input arguments.interface
TextFileParser<T extends @NonNull Object>
Parses an argument from an attached text file.interface
UserArgumentParser<T extends @NonNull Object>
Parses Discord users.Classes in dev.sympho.modular_commands.api.command.parameter.parse that implement ParserFunctionModifier and TypeClassDescriptionstatic class
ParserFunction.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 P1
ParserFunction.PostParser.parser
The first parser to apply.protected final P2
ParserFunction.PostParser.postParser
The 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 class
UrlParser.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 TypeInterfaceDescriptioninterface
FunctorUrlParser<T extends @NonNull Object>
A parser for URL-based arguments that are independent from the invocation context.interface
A parser wrapper that tolerates errors by returning a result that reports either the parsed item or an encountered error.interface
A parser for URL-based arguments.Classes in dev.sympho.modular_commands.utils.parse that implement ParserFunctionModifier and TypeClassDescriptionstatic class
FunctorUrlParser.Choice<T extends @NonNull Object>
Parser that supports multiple URL types by delegating to one of a list of parsers.static class
FunctorUrlParser.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 class
FunctorUrlParser.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 record
StringAdapter<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 class
UrlParser.Choice<T extends @NonNull Object>
Parser that supports multiple URL types by delegating to one of a list of parsers.static class
UrlParser.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 class
UrlParser.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.BOOLEAN
Parser for booleans from strings.static final ParserFunction<String,
Snowflake> ParseUtils.CHANNEL_ID
Parser for channel IDs from strings.static final ParserFunction<String,
Double> ParseUtils.FLOAT
Parser for floats from strings.static final ParserFunction<String,
Long> ParseUtils.INTEGER
Parser for integers from strings.static final ParserFunction<String,
Snowflake> ParseUtils.MESSAGE_ID
Parser for message IDs from strings.static final ParserFunction<String,
Snowflake> ParseUtils.ROLE_ID
Parser for role IDs from strings.static final ParserFunction<String,
Snowflake> ParseUtils.SNOWFLAKE
Parser for snowflakes from strings.static final ParserFunction<String,
Snowflake> ParseUtils.USER_ID
Parser 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 therawParser
record component.StringAdapter.valueParser()
Returns the value of thevalueParser
record 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 parser
to 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 aStringAdapter
record 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 TypeClassDescriptionclass
ChannelMentionParser<C extends @NonNull Channel>
A parser for channel mentions.class
ChannelParser<C extends @NonNull Channel>
A parser that extracts a channel from a string.class
ChannelRefMentionParser<C extends Channel>
A parser for channel mentions to references.class
ChannelRefParser<C extends @NonNull Channel>
A parser that extracts a channel reference from a string.class
ChannelRefUrlParser<C extends @NonNull Channel>
A reference parser for channel URLs.class
ChannelUrlParser<C extends @NonNull Channel>
A parser for channel URLs.class
EntityMentionParser<E extends @NonNull Entity>
A parser for mentions of Discord entities.class
EntityParser<E extends @NonNull Entity>
A parser that extracts an entity from a string.class
EntityRefMentionParser<R extends EntityRef<? extends @NonNull Entity>>
A parser for mentions of Discord entities to references.class
EntityRefParser<R extends EntityRef<? extends @NonNull Entity>>
A parser that extracts an entity reference from a string.class
EntityRefUrlParser<R extends EntityRef<? extends @NonNull Entity>>
A parser for URLs of Discord entities to references.class
EntityUrlParser<E extends @NonNull Entity>
A parser for URLs of Discord entities.class
A parser that extracts a message from a string.class
A parser that extracts a message reference from a string.class
A parser for message URLs.class
A parser for message URLs.class
A parser for role mentions.class
A parser that extracts a role from a string.class
A parser for user mentions to references.class
A parser that extracts a role reference from a string.class
A parser for user mentions.class
A parser that extracts an user from a string.class
A parser for user mentions to references.class
A parser that extracts a user reference from a string.