net.cercis.jstruct.ui
Class Model

java.lang.Object
  extended bynet.cercis.jstruct.ui.Model

public class Model
extends java.lang.Object

Model Object. This object is used in the UI to create a model and manipulate it allowing to add or remove objects. Once it is completely defined and approved by the user, it is copied into a ModelCalc object so that it can be calculated. The object could be made final but it has been preferred not to do it so that the UI becomes completely separate from the solution process. Furthermore, even if the maps (references to objects) are final, the objects contained in them are not final and they may point out to a changing object without the possibility of changing the references.


Constructor Summary
Model(Info infos, java.util.Map mnodes, java.util.Map melems, java.util.Map mmates, java.util.Map mbouns, java.util.Map mlsprs, java.util.Map mhnods, java.util.Map mheles)
          Class Constructor with the information of the final Maps and objects
Model(ModelCalc modelCalc)
          Class Constructor that copies a final ModelCalc object
 
Method Summary
 void clearAll()
          Clears and deletes all the stored Maps
 Info getInfos()
          Returns the Info object with the information of the model
 java.util.Map getMbouns()
          Returns the Map of Bouns objects
 java.util.Map getMelems()
          Returns the Map of Elem objects
 java.util.Map getMheles()
          Returns the Map of Hele objects
 java.util.Map getMhnods()
          Returns the Map of Hnod objects
 java.util.Map getMlsprs()
          Returns the Map of Lspr objects
 java.util.Map getMmates()
          Returns the Map of Mates objects
 java.util.Map getMnodes()
          Returns the Map of Node objects
 boolean isPossible()
          Returns wheter the Model is possible to be or not
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Model

public Model(Info infos,
             java.util.Map mnodes,
             java.util.Map melems,
             java.util.Map mmates,
             java.util.Map mbouns,
             java.util.Map mlsprs,
             java.util.Map mhnods,
             java.util.Map mheles)
Class Constructor with the information of the final Maps and objects

Parameters:
infos - Info object with the information of the model
mnodes - Map containing the information of the Node objects
melems - Map containing the information of the Elem objects
mmates - Map containing the information of the Mate objects
mbouns - Map containing the information of the Boun objects
mlsprs - Map containing the information of the Lspr objects
mhnods - Map containing the information of the Hnod objects
mheles - Map containing the information of the Hele objects

Model

public Model(ModelCalc modelCalc)
Class Constructor that copies a final ModelCalc object

Parameters:
modelCalc - ModelCalc Object to be copied
Method Detail

getInfos

public Info getInfos()
Returns the Info object with the information of the model

Returns:
Info Object with the information of the model

getMnodes

public java.util.Map getMnodes()
Returns the Map of Node objects

Returns:
Map with the Node objects

getMelems

public java.util.Map getMelems()
Returns the Map of Elem objects

Returns:
Map with the Elem objects

getMmates

public java.util.Map getMmates()
Returns the Map of Mates objects

Returns:
Map with the Mates objects

getMbouns

public java.util.Map getMbouns()
Returns the Map of Bouns objects

Returns:
Map with the Bouns objects

getMlsprs

public java.util.Map getMlsprs()
Returns the Map of Lspr objects

Returns:
Map with the Lspr objects

getMhnods

public java.util.Map getMhnods()
Returns the Map of Hnod objects

Returns:
Map with the Hnod objects

getMheles

public java.util.Map getMheles()
Returns the Map of Hele objects

Returns:
Map with the Hele objects

clearAll

public void clearAll()
Clears and deletes all the stored Maps


isPossible

public boolean isPossible()
Returns wheter the Model is possible to be or not

Returns:
Boolean value: true if it is possible and false if not