Package redempt.redlib.commandmanager
Class ArgSubtype<T,K>
java.lang.Object
redempt.redlib.commandmanager.ArgType<T>
redempt.redlib.commandmanager.ArgSubtype<T,K>
- Type Parameters:
T
- The type this ArgType converts toK
- The type this ArgType is dependent on
An ArgType which is dependent on another type appearing before it and uses it for conversions and tab completion
-
Nested Class Summary
Nested classes/interfaces inherited from class redempt.redlib.commandmanager.ArgType
ArgType.ArgConverter<T,
K>, ArgType.TabCompleter<T>, ArgType.TabStreamCompleter<T> -
Constructor Summary
ModifierConstructorDescriptionprotected
ArgSubtype
(String name, ArgType<?> parent, ArgType.ArgConverter<T, ?> convert) -
Method Summary
Modifier and TypeMethodDescriptionArgSubtype<T,
K> tab
(ArgType.TabCompleter<K> tab) Sets the tab completer for this typeArgSubtype<T,
K> Sets the tab completer for this type, can be used instead of tabMethods inherited from class redempt.redlib.commandmanager.ArgType
checkConstraint, constraint, convert, getConstraint, getDefault, getName, getParent, map, map, of, of, of, setTab, setTab, setTab, subType, subType, tabComplete, tabStream, tabStream
-
Constructor Details
-
ArgSubtype
-
-
Method Details
-
tab
Sets the tab completer for this type- Parameters:
tab
- The function returning a List of all completions for this sender and previous argument- Returns:
- itself
-
tabStream
Sets the tab completer for this type, can be used instead of tab- Parameters:
tab
- The function returning a Stream of all completions for this sender and previous argument- Returns:
- itself
-