|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.opera.core.systems.OperaArguments
public class OperaArguments
| Field Summary | |
|---|---|
protected List<OperaArgument> |
arguments
|
static String |
DEFAULT_SIGN
|
| Constructor Summary | |
|---|---|
OperaArguments()
Provides a key/value storage of arguments related to the Opera product binary. |
|
OperaArguments(String spaceDelimitedArguments)
Provide a space delimited list of arguments as a string that will be parsed and used as the default values for this storage. |
|
| Method Summary | |
|---|---|
void |
add(OperaArgument argument)
Adds a new argument to the command-line argument list representation. |
void |
add(String key)
Adds a new argument to the command-line argument list representation. |
void |
add(String key,
String value)
Adds a new argument with a value to the command-line argument list representation. |
OperaArgument |
get(int index)
Convenience method to access the given indexed argument in the command-line list representation. |
List<OperaArgument> |
getArguments()
Gets the list of all arguments, each represented by OperaArgument. |
List<String> |
getArgumentsAsStringList()
Gets all arguments as a string list, including the argument's values. |
Iterator<OperaArgument> |
iterator()
Gets an iterator for all arguments present in this collection. |
OperaArguments |
merge(OperaArguments extraArguments)
Merge this command-line list representation with another representation. |
static OperaArguments |
parse(String string)
|
String |
sign()
Gets the command-line argument sign used by this implementation of OperaArguments. |
int |
size()
Fetches the number of arguments in the command-line list representation. |
org.json.JSONObject |
toJson()
Converts this instance to its JSON representation. |
String |
toString()
Gets the string representation of the command-line, as it would be used externally. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static String DEFAULT_SIGN
protected List<OperaArgument> arguments
| Constructor Detail |
|---|
public OperaArguments()
public OperaArguments(String spaceDelimitedArguments)
spaceDelimitedArguments - list of arguments, as they would appear in a terminal| Method Detail |
|---|
public void add(String key)
OperaArgumentsOperaArgument will be created with an empty value.
add in interface OperaArgumentskey - the argument key to add
public void add(String key,
String value)
OperaArgumentsOperaArgument will be created with specified value.
add in interface OperaArgumentskey - the argument key to addvalue - the value the argument should holdpublic void add(OperaArgument argument)
OperaArgumentsOperaArgument can optionally hold a value.
add in interface OperaArgumentsargument - the argument to addpublic OperaArgument get(int index)
OperaArgumentsOperaArguments.getArguments().get(x).
get in interface OperaArgumentsindex - the argument to fetch
public List<OperaArgument> getArguments()
OperaArgumentsOperaArgument.
getArguments in interface OperaArgumentspublic Iterator<OperaArgument> iterator()
OperaArguments
iterator in interface OperaArgumentsiterator in interface Iterable<OperaArgument>public List<String> getArgumentsAsStringList()
OperaArguments
getArgumentsAsStringList in interface OperaArgumentspublic String toString()
OperaArguments
toString in interface OperaArgumentstoString in class Objectpublic int size()
OperaArgumentsOperaArguments.getArguments().size().
size in interface OperaArgumentspublic static OperaArguments parse(String string)
public final OperaArguments merge(OperaArguments extraArguments)
OperaArgumentsOperaArguments
object.
merge in interface OperaArgumentsextraArguments - the OperaArguments to merge into this
public String sign()
OperaArgumentsOperaArguments.
Depending on which implementation (OperaCoreArguments,
OperaDesktopArguments) you are using, you will get a
OperaArgument.OperaArgumentSign.
sign in interface OperaArgumentsOperaArgument.OperaArgumentSign
public org.json.JSONObject toJson()
throws org.json.JSONException
org.json.JSONException - if an error occurs while encoding these settings as JSON
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||