Class AttributeSingleValueSelector


  • public class AttributeSingleValueSelector
    extends Object
    Attribute single value selector. Selects a single value from a multi-valued attribute.
    • Constructor Detail

      • AttributeSingleValueSelector

        public AttributeSingleValueSelector​(int valueIndex)
        Creates a new attribute single value selector.
        Parameters:
        valueIndex - The value index, starting from zero.
    • Method Detail

      • getValueIndex

        public int getValueIndex()
        Returns the value index.
        Returns:
        The value index, starting from zero.
      • transformAttribute

        public com.unboundid.ldap.sdk.Attribute transformAttribute​(com.unboundid.ldap.sdk.Attribute in)
        Transforms the specified attribute by selecting the value at the configured index. Has no effect on single-valued or null attributes. If the index is out of bounds the last attribute value is returned.
        Parameters:
        in - The attribute to transform. May be null.
        Returns:
        The attribute with a guaranteed single value.