graphmine-core / io.github.sof3.graphmine.command.args / EnumArg
class EnumArg<E : Enum<E>> : CommandArg<E>
Accepts a value that names one of the constants in the enum class
| SymbolPolicy | enum class SymbolPolicyThe policy to use for comparing symbols in enum names |
| <init> | EnumArg(enumClass: KClass<E>)Accepts a value that names one of the constants in the enum class |
| ignoreCase | var ignoreCase: BooleanMatch enum constant names case-insensitively. |
| symbolPolicy | var symbolPolicy: SymbolPolicyThe policy for comparing symbols in enum names |
| default | var default: T?Sets the default value of the command. Implicitly sets optional to true (even if the set value is null) |
| optional | var optional: BooleanWhether the command arg can be skipped |
| value | lateinit var value: TThe received value of the argument |
| parse | fun parse(parser: FormattedStringReader): E?Reads the next value in the parser into the value for the argument |
| accept | fun accept(parser: FormattedStringReader): BooleanReads the next value in the parser into the value for the argument. |
| default | fun default(value: T): CommandArg<T>Sets the default value of the command. Implicitly sets optional to true (even if the set value is null) |
| provideDelegate | open fun provideDelegate(thisRef: Overload, property: KProperty<*>): ReadOnlyProperty<Overload, T> |