Package org.eclipse.core.commands
Class Parameterization
- java.lang.Object
-
- org.eclipse.core.commands.Parameterization
-
public final class Parameterization extends java.lang.ObjectA parameter with a specific value. This is usually a part of a
ParameterizedCommand, which is used to refer to a command with a collection of parameterizations.- Since:
- 3.1
-
-
Constructor Summary
Constructors Constructor Description Parameterization(IParameter parameter, java.lang.String value)Constructs a new instance ofParameterization.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(java.lang.Object object)IParametergetParameter()Returns the parameter that is being parameterized.java.lang.StringgetValue()Returns the value for the parameter in this parameterization.java.lang.StringgetValueName()Returns the human-readable name for the current value, if any.inthashCode()
-
-
-
Constructor Detail
-
Parameterization
public Parameterization(IParameter parameter, java.lang.String value)
Constructs a new instance ofParameterization.- Parameters:
parameter- The parameter that is being parameterized; must not benull.value- The value for the parameter; may benull.
-
-
Method Detail
-
equals
public final boolean equals(java.lang.Object object)
- Overrides:
equalsin classjava.lang.Object
-
getParameter
public final IParameter getParameter()
Returns the parameter that is being parameterized.- Returns:
- The parameter; never
null.
-
getValue
public final java.lang.String getValue()
Returns the value for the parameter in this parameterization.- Returns:
- The value; may be
null.
-
getValueName
public final java.lang.String getValueName() throws ParameterValuesExceptionReturns the human-readable name for the current value, if any. If the name cannot be found, then it simply returns the value. It also ensures that anynullvalues are converted into an empty string.- Returns:
- The human-readable name of the value; never
null. - Throws:
ParameterValuesException- If the parameter needed to be initialized, but couldn't be.
-
hashCode
public final int hashCode()
- Overrides:
hashCodein classjava.lang.Object
-
-