/** * Retrieves the set of values for the specified attribute, if available. * * @param attributeName The name of the attribute for which to retrieve the * values. It must not be {@code null}. * * @return The set of values for the specified attribute, or {@code null} if * that attribute is not available. */ public String[] getAttributeValues(final String attributeName) { ensureNotNull(attributeName); for (final CompactAttribute a : attributes) { if (a.getName().equalsIgnoreCase(attributeName)) { return a.getStringValues(); } } return null; }
/** * Retrieves the set of values for the specified attribute, if available. * * @param attributeName The name of the attribute for which to retrieve the * values. It must not be {@code null}. * * @return The set of values for the specified attribute, or {@code null} if * that attribute is not available. */ public String[] getAttributeValues(final String attributeName) { ensureNotNull(attributeName); for (final CompactAttribute a : attributes) { if (a.getName().equalsIgnoreCase(attributeName)) { return a.getStringValues(); } } return null; }
/** * Retrieves the value for the specified attribute, if available. If the * attribute has more than one value, then the first value will be returned. * * @param attributeName The name of the attribute for which to retrieve the * value. It must not be {@code null}. * * @return The value for the specified attribute, or {@code null} if that * attribute is not available. */ public String getAttributeValue(final String attributeName) { ensureNotNull(attributeName); for (final CompactAttribute a : attributes) { if (a.getName().equalsIgnoreCase(attributeName)) { final String[] values = a.getStringValues(); if (values.length > 0) { return values[0]; } else { return null; } } } return null; }
/** * Retrieves the value for the specified attribute, if available. If the * attribute has more than one value, then the first value will be returned. * * @param attributeName The name of the attribute for which to retrieve the * value. It must not be {@code null}. * * @return The value for the specified attribute, or {@code null} if that * attribute is not available. */ public String getAttributeValue(final String attributeName) { ensureNotNull(attributeName); for (final CompactAttribute a : attributes) { if (a.getName().equalsIgnoreCase(attributeName)) { final String[] values = a.getStringValues(); if (values.length > 0) { return values[0]; } else { return null; } } } return null; }