Package org.moeaframework.core.attribute
Class OperatorIndex
java.lang.Object
org.moeaframework.core.attribute.OperatorIndex
- All Implemented Interfaces:
Attribute
Operator index attribute. This is used by
AdaptiveMultimethodVariation
to
indicate which operator, based on its index, produced the solution.-
Field Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic final int
getAttribute
(Solution solution) Returns the value of the attribute stored in the solution.static final boolean
hasAttribute
(Solution solution) Returnstrue
if the solution defines this attribute;false
otherwise.static final void
removeAttribute
(Solution solution) Removes the attribute from the solution.static final void
setAttribute
(Solution solution, int value) Sets the value of the attribute on the solution.
-
Field Details
-
ATTRIBUTE_NAME
The name / key used for this attribute.- See Also:
-
-
Method Details
-
hasAttribute
Returnstrue
if the solution defines this attribute;false
otherwise.- Parameters:
solution
- the solution- Returns:
true
if the solution defines this attribute;false
otherwise
-
setAttribute
Sets the value of the attribute on the solution.- Parameters:
solution
- the solutionvalue
- the value to set
-
getAttribute
Returns the value of the attribute stored in the solution.- Parameters:
solution
- the solution- Returns:
- the stored value
-
removeAttribute
Removes the attribute from the solution.- Parameters:
solution
- the solution
-