public final class Parameter
extends java.lang.Object
A parameter for a command. A parameter identifies a type of information that the command might accept. For example, a "Show View" command might accept the id of a view for display. This parameter also identifies possible values, for display in the user interface.
Parameters are mutable, and can change as the command changes. Notifications will not be sent if the parameter itself changes. Listeners can be attached to the command.
| Modifier and Type | Field and Description |
|---|---|
protected java.lang.String |
id
The identifier for this object.
|
protected java.lang.String |
string
The string representation of this object.
|
| Constructor and Description |
|---|
Parameter(java.lang.String id,
java.lang.String name,
IConfigurationElement values,
ParameterType parameterType,
boolean optional)
Constructs a new instance of
Parameter with all of its values pre-defined. |
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(java.lang.Object object)
Tests whether this object is equal to another object.
|
java.lang.String |
getId() |
java.lang.String |
getName() |
ParameterType |
getParameterType() |
IParameterValues |
getValues() |
int |
hashCode() |
boolean |
isOptional() |
java.lang.String |
toString() |
protected final java.lang.String id
null.protected transient java.lang.String string
public Parameter(java.lang.String id,
java.lang.String name,
IConfigurationElement values,
ParameterType parameterType,
boolean optional)
Parameter with all of its values pre-defined.id - The identifier for this parameter; must not be null.name - The name for this parameter; must not be null.values - The values for this parameter; must not be null.parameterType - the type for this parameter; may be null if the parmeter doesn't
declare type.optional - Whether this parameter is optional (as opposed to required).public final boolean equals(java.lang.Object object)
equals in class java.lang.Objectobject - The object with which to compare; may be null.true if the objects are equal; false otherwise.public final java.lang.String getId()
public final java.lang.String getName()
public final ParameterType getParameterType()
public final IParameterValues getValues()
throws ParameterValuesException
ParameterValuesExceptionpublic final int hashCode()
hashCode in class java.lang.Objectpublic final boolean isOptional()
public final java.lang.String toString()
toString in class java.lang.Object