/** * Copy constructor * The associations with other objects are not copied * * @param EquipmentContainer * the reference to the class to copy * @return the class constructed */ private EquipmentContainer(final EquipmentContainer otherEquipmentContainer) { // TODO : check exception safe this.copyBase(otherEquipmentContainer); }
/** * 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 otherLine * the instance to copy */ public void copyBase(final Line otherLine) { // 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(otherLine); }
/** * 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 otherSubstation * the instance to copy */ public void copyBase(final Substation otherSubstation) { // 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 (otherSubstation.currentBitset.get(0)) { SubGeographicalRegion regionAssociation = otherSubstation.getRegion(); //this.idRegion = (regionAssociation != null) ? regionAssociation.getId() : ""; if (regionAssociation != null) { this.idRegion = regionAssociation.getId(); // the proper bit will be set when the setter is called } else { this.idRegion = ""; } } // TODO : Call the parent copy constructor instead ? super.copyBase(otherSubstation); }
super.copyBase(otherVoltageLevel);