/** * Returns the attribute value, or {@code null} if none. * * @return the attribute value (may be {@code null}). * @throws IllegalStateException if this attribute contains more than one value. */ @Override public V getValue() { switch (values.size()) { case 0: return null; case 1: return values.get(0); default: throw new IllegalStateException(Resources.format(Resources.Keys.NotASingleton_1, getName())); } }
/** * Returns the feature, or {@code null} if none. * * @return the feature (may be {@code null}). * @throws IllegalStateException if this association contains more than one value. */ @Override public AbstractFeature getValue() { switch (values.size()) { case 0: return null; case 1: return values.get(0); default: throw new IllegalStateException(Resources.format(Resources.Keys.NotASingleton_1, getName())); } }
/** * Returns the attribute value, or {@code null} if none. * * @return the attribute value (may be {@code null}). * @throws IllegalStateException if this attribute contains more than one value. */ @Override public V getValue() { switch (values.size()) { case 0: return null; case 1: return values.get(0); default: throw new IllegalStateException(Resources.format(Resources.Keys.NotASingleton_1, getName())); } }
/** * Returns the feature, or {@code null} if none. * * @return the feature (may be {@code null}). * @throws IllegalStateException if this association contains more than one value. */ @Override public AbstractFeature getValue() { switch (values.size()) { case 0: return null; case 1: return values.get(0); default: throw new IllegalStateException(Resources.format(Resources.Keys.NotASingleton_1, getName())); } }