/** * 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 otherBaseVoltage * the instance to copy */ public void copyBase(final BaseVoltage otherBaseVoltage) { boolean newisDC; // assigning primitive type : if (otherBaseVoltage.currentBitset.get(0)) { newisDC = otherBaseVoltage.isDC(); this.setIsDC(newisDC); } float newnominalVoltage; // assigning primitive type : if (otherBaseVoltage.currentBitset.get(3)) { newnominalVoltage = otherBaseVoltage.getNominalVoltage(); this.setNominalVoltage(newnominalVoltage); } // 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(otherBaseVoltage); }
this.setNominalVoltage(typedValue); return; } else {