/** * Indicates whether this entry contains the specified attribute. * * @param attributeName The name of the attribute for which to make the * determination. It must not be {@code null}. * * @return {@code true} if this entry contains the specified attribute, or * {@code false} if not. */ public boolean hasAttribute(final String attributeName) { ensureNotNull(attributeName); for (final CompactAttribute a : attributes) { if (a.getName().equalsIgnoreCase(attributeName)) { return true; } } return false; }
/** * Indicates whether this entry contains the specified attribute. * * @param attributeName The name of the attribute for which to make the * determination. It must not be {@code null}. * * @return {@code true} if this entry contains the specified attribute, or * {@code false} if not. */ public boolean hasAttribute(final String attributeName) { ensureNotNull(attributeName); for (final CompactAttribute a : attributes) { if (a.getName().equalsIgnoreCase(attributeName)) { return true; } } return false; }
/** * 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 as byte arrays, 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 as byte arrays, or * {@code null} if that attribute is not available. */ public byte[][] getAttributeValueByteArrays(final String attributeName) { ensureNotNull(attributeName); for (final CompactAttribute a : attributes) { if (a.getName().equalsIgnoreCase(attributeName)) { return a.getByteValues(); } } return null; }
/** * Retrieves the attribute with the specified name. * * @param attributeName The name of the attribute to retrieve. It must not * be {@code null}. * * @return The requested attribute from this entry, or {@code null} if the * specified attribute is not present in this entry. */ public Attribute getAttribute(final String attributeName) { ensureNotNull(attributeName); for (final CompactAttribute a : attributes) { if (a.getName().equalsIgnoreCase(attributeName)) { return a.toAttribute(); } } 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 attribute with the specified name. * * @param attributeName The name of the attribute to retrieve. It must not * be {@code null}. * * @return The requested attribute from this entry, or {@code null} if the * specified attribute is not present in this entry. */ public Attribute getAttribute(final String attributeName) { ensureNotNull(attributeName); for (final CompactAttribute a : attributes) { if (a.getName().equalsIgnoreCase(attributeName)) { return a.toAttribute(); } } return null; }
/** * Retrieves the set of values for the specified attribute as byte arrays, 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 as byte arrays, or * {@code null} if that attribute is not available. */ public byte[][] getAttributeValueByteArrays(final String attributeName) { ensureNotNull(attributeName); for (final CompactAttribute a : attributes) { if (a.getName().equalsIgnoreCase(attributeName)) { return a.getByteValues(); } } return null; }
if (a.getName().equalsIgnoreCase(attributeName))
/** * 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; }
if (a.getName().equalsIgnoreCase(attributeName))
/** * Indicates whether this entry contains an attribute with the given name and * value. * * @param attributeName The name of the attribute for which to make the * determination. It must not be {@code null}. * @param attributeValue The value for which to make the determination. It * must not be {@code null}. * * @return {@code true} if this entry contains an attribute with the * specified name and value, or {@code false} if not. */ public boolean hasAttributeValue(final String attributeName, final byte[] attributeValue) { ensureNotNull(attributeName, attributeValue); for (final CompactAttribute a : attributes) { if (a.getName().equalsIgnoreCase(attributeName) && a.toAttribute().hasValue(attributeValue)) { return true; } } return false; }
/** * Indicates whether this entry contains an attribute with the given name and * value. * * @param attributeName The name of the attribute for which to make the * determination. It must not be {@code null}. * @param attributeValue The value for which to make the determination. It * must not be {@code null}. * * @return {@code true} if this entry contains an attribute with the * specified name and value, or {@code false} if not. */ public boolean hasAttributeValue(final String attributeName, final byte[] attributeValue) { ensureNotNull(attributeName, attributeValue); for (final CompactAttribute a : attributes) { if (a.getName().equalsIgnoreCase(attributeName) && a.toAttribute().hasValue(attributeValue)) { return true; } } return false; }
/** * Indicates whether this entry contains an attribute with the given name and * value. * * @param attributeName The name of the attribute for which to make the * determination. It must not be {@code null}. * @param attributeValue The value for which to make the determination. It * must not be {@code null}. * * @return {@code true} if this entry contains an attribute with the * specified name and value, or {@code false} if not. */ public boolean hasAttributeValue(final String attributeName, final String attributeValue) { ensureNotNull(attributeName, attributeValue); for (final CompactAttribute a : attributes) { if (a.getName().equalsIgnoreCase(attributeName) && a.toAttribute().hasValue(attributeValue)) { return true; } } return false; }
/** * Indicates whether this entry contains an attribute with the given name and * value. * * @param attributeName The name of the attribute for which to make the * determination. It must not be {@code null}. * @param attributeValue The value for which to make the determination. It * must not be {@code null}. * * @return {@code true} if this entry contains an attribute with the * specified name and value, or {@code false} if not. */ public boolean hasAttributeValue(final String attributeName, final String attributeValue) { ensureNotNull(attributeName, attributeValue); for (final CompactAttribute a : attributes) { if (a.getName().equalsIgnoreCase(attributeName) && a.toAttribute().hasValue(attributeValue)) { return true; } } return false; }