|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object net.sourceforge.cilib.entity.AbstractEntity
public abstract class AbstractEntity
Abstract class definition for all concrete Entity objects. This class defines the Entity main data structure for the values stored within the Entity itself.
Constructor Summary | |
---|---|
protected |
AbstractEntity()
Initialise the candidate solution of the Entity. |
protected |
AbstractEntity(AbstractEntity copy)
Copy constructor. |
Method Summary | |
---|---|
boolean |
equals(Object object)
It doesn;t make sense to compare the meta data of the entity. |
Fitness |
getBestFitness()
Return the best fitness associated with this Entity, provided a best fitness is defined on the Entity. |
StructuredType |
getCandidateSolution()
Get the value of the CandidateSolution maintained by this Entity. |
Fitness |
getFitness()
Get the fitness of the CandidateSolution maintained by this Entity. |
FitnessCalculator |
getFitnessCalculator()
Get the current FitnessCalculator for the current Entity . |
long |
getId()
Get the identifier associated with the Entity instance. |
Blackboard<Enum<?>,Type> |
getProperties()
Get the properties associate with the Entity . |
int |
hashCode()
|
void |
setCandidateSolution(StructuredType candidateSolution)
Set the Type maintained by this Entitys CandidateSolution. |
void |
setFitnessCalculator(FitnessCalculator fitnessCalculator)
Set the FitnessCalculator for the current Entity . |
void |
setProperties(Blackboard<Enum<?>,Type> properties)
Set the properties for the current Entity . |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface net.sourceforge.cilib.entity.Entity |
---|
calculateFitness, calculateFitness, compareTo, getClone, getDimension, initialise, reinitialise |
Constructor Detail |
---|
protected AbstractEntity()
protected AbstractEntity(AbstractEntity copy)
copy
- The instance to copy.Method Detail |
---|
public boolean equals(Object object)
equals
in class Object
object
- The object to compare equality.public int hashCode()
hashCode
in class Object
public final Blackboard<Enum<?>,Type> getProperties()
Entity
.
getProperties
in interface CandidateSolution
getProperties
in interface Entity
public final void setProperties(Blackboard<Enum<?>,Type> properties)
Entity
.
setProperties
in interface CandidateSolution
setProperties
in interface Entity
properties
- The Blackboard containing the new properties.public StructuredType getCandidateSolution()
getCandidateSolution
in interface CandidateSolution
getCandidateSolution
in interface Entity
public Fitness getFitness()
getFitness
in interface CandidateSolution
getFitness
in interface Entity
public void setCandidateSolution(StructuredType candidateSolution)
setCandidateSolution
in interface CandidateSolution
setCandidateSolution
in interface Entity
candidateSolution
- The Type that will be the new value of the
Entity CandidateSolution.public Fitness getBestFitness()
getBestFitness
in interface Entity
public FitnessCalculator getFitnessCalculator()
FitnessCalculator
for the current Entity
.
getFitnessCalculator
in interface Entity
FitnessCalculator
associated with this Entity
.public void setFitnessCalculator(FitnessCalculator fitnessCalculator)
FitnessCalculator
for the current Entity
.
fitnessCalculator
- The value to set.public long getId()
Entity
instance.
getId
in interface Entity
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |