es.udc.gii.common.eaf.algorithm.parallel.topology.evaluation
Class EvaluationObject

java.lang.Object
  extended by es.udc.gii.common.eaf.algorithm.parallel.topology.evaluation.EvaluationObject
All Implemented Interfaces:
java.io.Externalizable, java.io.Serializable

public class EvaluationObject
extends java.lang.Object
implements java.io.Externalizable

This class represents an envelope for exchanging individuals between master nodes and slave nodes where they have to be evaluated.

Since:
1.0
Author:
Grupo Integrado de IngenierĂ­a (www.gii.udc.es)
See Also:
Serialized Form

Field Summary
private  int dest
          Rank of the destiny node.
private  java.util.List<Individual> individuals
          Individuals to send or individuals received.
static int NOT_SPECIFIED
          Special value for the source and dest rank when they are not known.
private  int source
          Rank of the source node.
 
Constructor Summary
EvaluationObject()
          Creates a new instance of EvaluationObject
EvaluationObject(java.util.List<Individual> individuals, int source, int dest)
          Creates a new instance of EvaluationObject
 
Method Summary
 java.lang.Object clone()
          Clones this object.
 boolean equals(java.lang.Object obj)
           
 int getDest()
           
 java.util.List<Individual> getIndividuals()
           
 int getSource()
           
 int hashCode()
           
 void readExternal(java.io.ObjectInput in)
           
 void setDest(int dest)
           
 void setIndividuals(java.util.List<Individual> individuals)
           
 void setSource(int source)
           
 java.lang.String toString()
           
 void writeExternal(java.io.ObjectOutput out)
           
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

NOT_SPECIFIED

public static final int NOT_SPECIFIED
Special value for the source and dest rank when they are not known.

See Also:
Constant Field Values

source

private int source
Rank of the source node.


dest

private int dest
Rank of the destiny node.


individuals

private java.util.List<Individual> individuals
Individuals to send or individuals received.

Constructor Detail

EvaluationObject

public EvaluationObject()
Creates a new instance of EvaluationObject


EvaluationObject

public EvaluationObject(java.util.List<Individual> individuals,
                        int source,
                        int dest)
Creates a new instance of EvaluationObject

Method Detail

clone

public java.lang.Object clone()
Clones this object. Take care: the list of individiduals is not cloned. Thus this object and its clone share the same list!

Overrides:
clone in class java.lang.Object

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

getSource

public int getSource()

setSource

public void setSource(int source)

getIndividuals

public java.util.List<Individual> getIndividuals()

setIndividuals

public void setIndividuals(java.util.List<Individual> individuals)

getDest

public int getDest()

setDest

public void setDest(int dest)

equals

public boolean equals(java.lang.Object obj)
Overrides:
equals in class java.lang.Object

hashCode

public int hashCode()
Overrides:
hashCode in class java.lang.Object

writeExternal

public void writeExternal(java.io.ObjectOutput out)
                   throws java.io.IOException
Specified by:
writeExternal in interface java.io.Externalizable
Throws:
java.io.IOException

readExternal

public void readExternal(java.io.ObjectInput in)
                  throws java.io.IOException,
                         java.lang.ClassNotFoundException
Specified by:
readExternal in interface java.io.Externalizable
Throws:
java.io.IOException
java.lang.ClassNotFoundException