public class CommandArgIterator extends Object
| Constructor and Description |
|---|
CommandArgIterator(Iterator<String> argsIt,
Set<String> commonArgumentsAndHighLevelCommandSet) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
hasNextArg() |
boolean |
hasNextSubArg() |
static boolean |
isCommandOrOption(String raw)
Check if raw arg is command or option.
|
String |
nextArg(String err)
Extract next argument.
|
int |
nextIntArg(String argName) |
long |
nextLongArg(String argName) |
int |
nextNonNegativeIntArg(String argName) |
long |
nextNonNegativeLongArg(String argName) |
Set<String> |
nextStringSet(String argName) |
@NotNull Set<String> |
parseStringSet(String string) |
String |
peekNextArg()
Returns the next argument in the iteration, without advancing the iteration.
|
public boolean hasNextArg()
true if the iteration has more elements.public boolean hasNextSubArg()
true if there's next argument for subcommand.public String nextArg(String err)
err - Error message.public String peekNextArg()
null if no next argument.public long nextNonNegativeLongArg(String argName)
public int nextNonNegativeIntArg(String argName)
public long nextLongArg(String argName)
public int nextIntArg(String argName)
public Set<String> nextStringSet(String argName)
argName - Name of argument.@NotNull public @NotNull Set<String> parseStringSet(String string)
string - To scan on for string set.public static boolean isCommandOrOption(String raw)
true If raw arg is command, overwise false.
Follow @ApacheIgnite
Ignite Database and Caching Platform : ver. 2.13.0 Release Date : April 20 2022