AbstractStereo(F focus, C[] carriers, int value) { if (focus == null) throw new NullPointerException("Focus of stereochemistry can not be null!"); if (carriers == null) throw new NullPointerException("Carriers of the configuration can not be null!"); if (carriers.length != numCarriers(value)) throw new IllegalArgumentException("Unexpected number of stereo carriers! expected " + ((value >>> 12) & 0xf) + " was " + carriers.length); for (C carrier : carriers) { if (carrier == null) throw new NullPointerException("A carrier was undefined!"); } this.value = value; this.focus = focus; this.carriers = new ArrayList<>(); Collections.addAll(this.carriers, carriers); }
AbstractStereo(F focus, C[] carriers, int value) { if (focus == null) throw new NullPointerException("Focus of stereochemistry can not be null!"); if (carriers == null) throw new NullPointerException("Carriers of the configuration can not be null!"); if (carriers.length != numCarriers(value)) throw new IllegalArgumentException("Unexpected number of stereo carriers! expected " + ((value >>> 12) & 0xf) + " was " + carriers.length); for (C carrier : carriers) { if (carrier == null) throw new NullPointerException("A carrier was undefined!"); } this.value = value; this.focus = focus; this.carriers = new ArrayList<>(); Collections.addAll(this.carriers, carriers); }