public OneOfAttributeBuilder addAlternative(final Attribute newAttribute) { if (newAttribute != null) { if (result.getAlternativeByTypeQulifier(newAttribute.getType()) != null) { throw new IllegalArgumentException("Cannot add more than one oneOf alternative Attribute with the same Type."); } result.alternatives.add(newAttribute); } return this; }