Class UUIDParser
java.lang.Object
net.apartium.cocoabeans.commands.parsers.ArgumentParser<UUID>
net.apartium.cocoabeans.commands.parsers.UUIDParser
- All Implemented Interfaces:
Comparable<ArgumentParser<?>>
-
Nested Class Summary
Nested classes/interfaces inherited from class net.apartium.cocoabeans.commands.parsers.ArgumentParser
ArgumentParser.ParseResult<T>, ArgumentParser.TabCompletionResult -
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionCreates new UUID parserUUIDParser(int priority) Creates new UUID parserUUIDParser(String keyword, int priority) Creates new UUID parser -
Method Summary
Modifier and TypeMethodDescriptionparse(CommandProcessingContext processingContext) Tries to parse next argument in the contexttabCompletion(CommandProcessingContext processingContext) Retrieves available options for tab completion of this argumenttryParse(CommandProcessingContext processingContext) Tries to lazily parse next argument in the contextMethods inherited from class net.apartium.cocoabeans.commands.parsers.ArgumentParser
compareTo, getArgumentType, getKeyword, getPriority
-
Field Details
-
DEFAULT_KEYWORD
- See Also:
-
-
Constructor Details
-
UUIDParser
Creates new UUID parser- Parameters:
keyword- parser keywordpriority- parser priority
-
UUIDParser
public UUIDParser(int priority) Creates new UUID parser- Parameters:
priority- parser priority- See Also:
-
UUIDParser
public UUIDParser()Creates new UUID parser- See Also:
-
-
Method Details
-
parse
Description copied from class:ArgumentParserTries to parse next argument in the context- Specified by:
parsein classArgumentParser<UUID>- Parameters:
processingContext- cmd processing context- Returns:
- empty if failed, otherwise result
-
tryParse
Description copied from class:ArgumentParserTries to lazily parse next argument in the context- Specified by:
tryParsein classArgumentParser<UUID>- Parameters:
processingContext- cmd processing context- Returns:
- new index int if success, empty if not
-
tabCompletion
public Optional<ArgumentParser.TabCompletionResult> tabCompletion(CommandProcessingContext processingContext) Description copied from class:ArgumentParserRetrieves available options for tab completion of this argument- Specified by:
tabCompletionin classArgumentParser<UUID>- Parameters:
processingContext- cmd processing context- Returns:
- tab completion result if success, otherwise empty option
-