@RelatedElementsAdd(Plant3D.URIs.HasNozzle)
public void addChild(Nozzle node) {
+ Collection<Nozzle> children = getChild();
+ if (numberOfFixedNozzles() > 0 && children.size() >= numberOfFixedNozzles())
+ throw new RuntimeException("Equipment has already all fixed nozzles");
+
Set<Integer> ids = new HashSet<Integer>();
- for (Nozzle n : getChild()) {
+ for (Nozzle n : children) {
ids.add(n.getNozzleId());
}
int newId = 0;