Class Constant<T>
java.lang.Object
org.moeaframework.analysis.parameter.AbstractParameter<T>
org.moeaframework.analysis.parameter.Constant<T>
- Type Parameters:
T
- the type of this parameter
A parameter assigned a constant value.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
Applies this constant to the given samples.void
Applies this constant to the given sample.Decodes the string representation of this parameter.Encodes this parameter definition in a format suitable for storing in a file.getValue()
Returns the constant value.Parses this parameter value from the given string.Methods inherited from class org.moeaframework.analysis.parameter.AbstractParameter
getName, toString
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface org.moeaframework.analysis.parameter.Parameter
assignValue, readValue
-
Constructor Details
-
Constant
Constructs a new constant parameter.- Parameters:
name
- the name of this parametervalue
- the constant value
-
-
Method Details
-
getValue
Returns the constant value.- Returns:
- the constant value
-
parse
Description copied from interface:Parameter
Parses this parameter value from the given string.- Parameters:
str
- the string- Returns:
- the parameter value
-
apply
Applies this constant to the given sample.- Parameters:
sample
- thes ample
-
apply
Applies this constant to the given samples.- Parameters:
samples
- the samples
-
encode
Description copied from interface:Parameter
Encodes this parameter definition in a format suitable for storing in a file.- Parameters:
tokenizer
- the tokenizer- Returns:
- the string representation
-
decode
Decodes the string representation of this parameter.- Parameters:
tokenizer
- the tokenizerline
- the string representation- Returns:
- the decoded parameter
- Throws:
InvalidParameterException
- if the string representation is not a valid parameter
-