AFArgs class

The set of arguments specified for an AFib command.

Mainly you would use setDebugArgs from your main function as an easy way to specfy debug arguments.

Otherwise, you should prefer AFCommandContext.parseArguments for accessing argument values.

Constructors

AFArgs(List<String> args)
AFArgs.create(List<String> args)
Create from a list of arguments
factory
AFArgs.createFromString(String arguments)
Create from a string, which is parsed into distinct arguments.
factory

Properties

args List<String>
getter/setter pair
command String
The name of the command that was executed.
no setter
count int
The number of arguments to the command (not including the command itself)
no setter
first String?
The first argument to the command (not including the command itself)
no setter
hasCommand bool
True if the arguments have a first argument, which is the command argument.
no setter
hashCode int
The hash code for this object.
no setterinherited
isEmpty bool
returns true if there are no arguments past the command itself.
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
second String?
The second argument to the command (not including the command itself)
no setter
third String?
The third argument to the command (not including the command itself)
no setter

Methods

addArg(String arg) → void
at(int i) String?
The nth space-separated argument (not including the command itself)
listFrom({int start = 0}) List<String>
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
reviseAddArg(String arg) AFArgs
reviseAddArgs(List<String> args) AFArgs
setDebugArgs(String revised) → void
Reset the arguments to those specified in revised.
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited

Static Methods

parseArgs(String revised) List<String>
Parses a string into a list of string arguments.