4 import java.io.Serializable;
5 import java.util.ArrayList;
10 * Class representing an association between a tasks list and a cluster
11 * on which they are mapped, or between a task and a computing node
12 * @author Sébastien Miquée
15 public class Association implements Serializable
17 private static final long serialVersionUID = 1L;
20 private Cluster c = null ;
21 private ArrayList<GTask> at = null ;
22 private GNode g = null ;
23 private GTask t = null ;
26 * Default constructor.
28 public Association(){}
33 * @param _c Associated cluster
34 * @param _at Tasks list
36 public Association( Cluster _c, ArrayList<GTask> _at )
45 * @param _g Associated computing node
46 * @param _t Associated task
48 public Association( GNode _g, GTask _t )
56 * Return the associated cluster.
57 * @return The associated cluster
59 public Cluster getCluster()
66 * Return the associated tasks list.
67 * @return The associated tasks list
69 public ArrayList<GTask> getGtasks()
75 * Return the associated computing node.
76 * @return The associated node
78 public GNode getGNode()
85 * Return the associated task.
86 * @return The associated task
88 public GTask getGTask()
95 * Replace the GNode of the association.
96 * @param _g The replacing GNode
97 * @return The state of the replacement
99 public boolean setGNode( GNode _g )
106 System.err.println( "(Association) The new GNode is null!" ) ;
113 * Replace the GTask of the association.
114 * @param _t The replacing GTask
116 public void setGtask( GTask _t )
123 /** La programmation est un art, respectons ceux qui la pratiquent !! **/