java.lang.Object
dev.sympho.modular_commands.utils.parse.entity.EntityRefParser<EntityRef.ChannelRef<C>>
dev.sympho.modular_commands.utils.parse.entity.ChannelRefParser<C>
- Type Parameters:
C- The channel type.
- All Implemented Interfaces:
ParserFunction<String,,EntityRef.ChannelRef<C>> BiFunction<CommandContext,String, Mono<EntityRef.ChannelRef<C>>>
public class ChannelRefParser<C extends @NonNull Channel>
extends EntityRefParser<EntityRef.ChannelRef<C>>
A parser that extracts a channel reference from a string.
- Since:
- 1.0
- Version:
- 1.0
-
Nested Class Summary
Nested classes/interfaces inherited from interface dev.sympho.modular_commands.api.command.parameter.parse.ParserFunction
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>> -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected EntityRef.ChannelRef<C>makeRef(CommandContext context, Snowflake id) Creates the reference.Methods inherited from class dev.sympho.modular_commands.utils.parse.entity.EntityRefParser
parse, parseRefMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface java.util.function.BiFunction
andThenMethods inherited from interface dev.sympho.modular_commands.api.command.parameter.parse.ParserFunction
apply, then
-
Constructor Details
-
ChannelRefParser
Creates a new instance.- Parameters:
type- The type of channel.
-
-
Method Details
-
makeRef
Description copied from class:EntityRefParserCreates the reference.- Specified by:
makeRefin classEntityRefParser<EntityRef.ChannelRef<C extends @NonNull Channel>>- Parameters:
context- The execution context.id- The parsed ID.- Returns:
- The created reference.
-