/** * Copy constructor * The associations with other objects are not copied * * @param OperationalLimit * the reference to the class to copy * @return the class constructed */ private OperationalLimit(final OperationalLimit otherOperationalLimit) { // TODO : check exception safe this.copyBase(otherOperationalLimit); }
/** * 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 otherVoltageLimit * the instance to copy */ public void copyBase(final VoltageLimit otherVoltageLimit) { float newvalue; // assigning primitive type : if (otherVoltageLimit.currentBitset.get(0)) { newvalue = otherVoltageLimit.getValue(); this.setValue(newvalue); } // 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(otherVoltageLimit); }
/** * 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 otherCurrentLimit * the instance to copy */ public void copyBase(final CurrentLimit otherCurrentLimit) { float newvalue; // assigning primitive type : if (otherCurrentLimit.currentBitset.get(0)) { newvalue = otherCurrentLimit.getValue(); this.setValue(newvalue); } // 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(otherCurrentLimit); }