Class NameValue

java.lang.Object
org.ldaptive.dn.NameValue

public class NameValue extends Object
Container for a RDN name value pair.
  • Field Details

    • HASH_CODE_SEED

      private static final int HASH_CODE_SEED
      hash code seed.
      See Also:
    • attributeName

      private final String attributeName
      Attribute name.
    • attributeValue

      private final ByteBuffer attributeValue
      Attribute value.
  • Constructor Details

    • NameValue

      public NameValue(String name, String value)
      Creates a new name value.
      Parameters:
      name - of the attribute
      value - of the attribute
    • NameValue

      public NameValue(String name, byte[] value)
      Creates a new name value.
      Parameters:
      name - of the attribute
      value - of the attribute
  • Method Details

    • getName

      public String getName()
      Returns the attribute name.
      Returns:
      attribute name
    • getBinaryValue

      public byte[] getBinaryValue()
    • getStringValue

      public String getStringValue()
    • getValue

      public <T> T getValue(Function<byte[],T> func)
    • hasName

      public boolean hasName(String name)
      Returns whether the attribute name matches the supplied name.
      Parameters:
      name - to match
      Returns:
      whether name matches the attribute name
    • format

      public String format()
      Returns a string representation of this name value, of the form 'name=value'.
      Returns:
      string form of the name value pair
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object