public abstract class BaseObjective extends java.lang.Object implements IObjective
IObjective
namely its name,
comparator and level.Constructor and Description |
---|
BaseObjective(java.lang.String name) |
Modifier and Type | Method and Description |
---|---|
boolean |
equals(java.lang.Object obj) |
java.util.Comparator<java.lang.Double> |
getComparator()
Returns a
Comparator which is used to compare fitness (doubles). |
int |
getLevel()
Gets the level of the objective.
|
java.lang.String |
getName()
Returns the name of the objective.
|
int |
hashCode() |
void |
setComparator(java.util.Comparator<java.lang.Double> comparator)
Sets the
Comparator which is used to compare fitness (doubles). |
void |
setLevel(int level)
Set the level of the objective.
|
java.lang.String |
toString() |
BaseObjective |
withComparator(java.util.Comparator<java.lang.Double> comparator) |
BaseObjective |
withLevel(int level) |
createNew, getFitness, init, isHardObjective, satisifiesHardObjective
public java.lang.String getName()
IObjective
getName
in interface IObjective
public void setComparator(java.util.Comparator<java.lang.Double> comparator)
IObjective
Comparator
which is used to compare fitness (doubles). It determines whether the objective is to
minimize or maximize (or minimize or maximize a delta from a given number).setComparator
in interface IObjective
comparator
- The comparator.public java.util.Comparator<java.lang.Double> getComparator()
IObjective
Comparator
which is used to compare fitness (doubles). It determines whether the objective is
to minimize or maximize (or minimize or maximize a delta from a given number).getComparator
in interface IObjective
public void setLevel(int level)
IObjective
setLevel
in interface IObjective
public int getLevel()
IObjective
getLevel
in interface IObjective
public BaseObjective withLevel(int level)
public BaseObjective withComparator(java.util.Comparator<java.lang.Double> comparator)
public int hashCode()
hashCode
in class java.lang.Object
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
public java.lang.String toString()
toString
in class java.lang.Object