/** * Utility to add a value within the "substations" ArrayList of * "Substation" * * @param substationsValue * value to add within the ArrayList * @param setInverse * boolean to specify whether to set the inverse association or not * @throws LinkageException */ public void addSubstations( Substation substationsValue, boolean setInverse) throws LinkageException { if (substations == null) { substations = new ArrayList<Substation>(); } this.substations.add(substationsValue); this.currentBitset.set(1); if (setInverse) { if (substationsValue != null) { substationsValue.setRegion(this, false); } } }