A - the command of their business logicpublic static class Command.Mapping<A> extends java.lang.Object implements Command<A>
Constructor: Command.mapping(pairs)
A handy constructor for pairs: Command.pair(a, b)
This commands:
/label a /label b
can be represented:
enum MyCommand {
A, B
}
Command.mapping(
pair("a", Command.present { MyCommand.A }),
pair("b", Command.present { MyCommand.B }),
);
Command.Parser,
CommandCommand.Mapping<A>, Command.Parser<A>| Modifier and Type | Method and Description |
|---|---|
java.util.Optional<Command<A>> |
getFallback() |
<B> Command.Mapping<B> |
map(java.util.function.Function<? super A,? extends B> f) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitargument, argument, argument, argument, argument, argument, argument, argument, getEntries, mapping, pair, parse, parseO, parseWithIndex, present, tabComplete, tabCompleteWithIndex