Package-level declarations

Types

Link copied to clipboard
class ArgumentCommandNode<S, T>(name: String, val type: ArgumentType<T>, command: Command<S>?, requirement: (S) -> Boolean, redirect: CommandNode<S>? = null, forks: Boolean = false, children: Map<String, CommandNode<S>>, customSuggestions: SuggestionProvider<S>? = null) : CommandNode<S>
Link copied to clipboard
abstract class CommandNode<S>(val name: String, val command: Command<S>?, val requirement: (S) -> Boolean, val redirect: CommandNode<S>?, val forks: Boolean, val children: Map<String, CommandNode<S>>) : Comparable<CommandNode<S>>
Link copied to clipboard
class LiteralCommandNode<S>(literal: String, command: Command<S>?, requirement: (S) -> Boolean, redirect: CommandNode<S>?, forks: Boolean, children: Map<String, CommandNode<S>> = emptyMap()) : CommandNode<S>
Link copied to clipboard

Functions

Link copied to clipboard
fun <S, R, T> ArgumentCommandNode<S, T>.mapSource(mapper: (R) -> S): ArgumentCommandNode<R, T>

Converts the given ArgumentCommandNode with source type S to an ArgumentCommandNode with source type R.

fun <S, R> CommandNode<S>.mapSource(mapper: (R) -> S): CommandNode<R>

Converts the given CommandNode with source type S to an CommandNode with source type R.

Converts the given LiteralCommandNode with source type S to an LiteralCommandNode with source type R.

fun <S, R> RootCommandNode<S>.mapSource(mapper: (R) -> S): RootCommandNode<R>

Converts the given RootCommandNode with source type S to an RootCommandNode with source type R.