/** * Copy constructor * The associations with other objects are not copied * * @param GeneratingUnit * the reference to the class to copy * @return the class constructed */ private GeneratingUnit(final GeneratingUnit otherGeneratingUnit) { // TODO : check exception safe this.copyBase(otherGeneratingUnit); }
/** * Utility to copy the "base" of an other instance of the same class * This utility does not copy the associations with other instances from * the instance to copy * * @param otherHydroGeneratingUnit * the instance to copy */ public void copyBase(final HydroGeneratingUnit otherHydroGeneratingUnit) { // Memory allocation has done successfully ! // Dropping "old" objects... // This part may change : we do nothing to allow the user to access // object by their id from the global model. // TODO : Call the parent copy constructor instead ? super.copyBase(otherHydroGeneratingUnit); }
/** * Utility to copy the "base" of an other instance of the same class * This utility does not copy the associations with other instances from * the instance to copy * * @param otherWindGeneratingUnit * the instance to copy */ public void copyBase(final WindGeneratingUnit otherWindGeneratingUnit) { // Memory allocation has done successfully ! // Dropping "old" objects... // This part may change : we do nothing to allow the user to access // object by their id from the global model. // TODO : Call the parent copy constructor instead ? super.copyBase(otherWindGeneratingUnit); }
/** * Utility to copy the "base" of an other instance of the same class * This utility does not copy the associations with other instances from * the instance to copy * * @param otherNuclearGeneratingUnit * the instance to copy */ public void copyBase(final NuclearGeneratingUnit otherNuclearGeneratingUnit) { // Memory allocation has done successfully ! // Dropping "old" objects... // This part may change : we do nothing to allow the user to access // object by their id from the global model. // TODO : Call the parent copy constructor instead ? super.copyBase(otherNuclearGeneratingUnit); }
/** * Utility to copy the "base" of an other instance of the same class * This utility does not copy the associations with other instances from * the instance to copy * * @param otherThermalGeneratingUnit * the instance to copy */ public void copyBase(final ThermalGeneratingUnit otherThermalGeneratingUnit) { // Memory allocation has done successfully ! // Dropping "old" objects... // This part may change : we do nothing to allow the user to access // object by their id from the global model. if (otherThermalGeneratingUnit.currentBitset.get(0)) { FossilFuel fossilFuelsAssociation = otherThermalGeneratingUnit.getFossilFuels(); //this.idFossilFuels = (fossilFuelsAssociation != null) ? fossilFuelsAssociation.getId() : ""; if (fossilFuelsAssociation != null) { this.idFossilFuels = fossilFuelsAssociation.getId(); // the proper bit will be set when the setter is called } else { this.idFossilFuels = ""; } } // TODO : Call the parent copy constructor instead ? super.copyBase(otherThermalGeneratingUnit); }