Class NameValue


  • public class NameValue
    extends java.lang.Object
    Container for a RDN name value pair.
    Author:
    Middleware Services
    • Constructor Summary

      Constructors 
      Constructor Description
      NameValue​(java.lang.String name, byte[] value)
      Creates a new name value.
      NameValue​(java.lang.String name, java.lang.String value)
      Creates a new name value.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      boolean equals​(java.lang.Object o)  
      java.lang.String format()
      Returns a string representation of this name value, of the form 'name=value'.
      byte[] getBinaryValue()  
      java.lang.String getName()
      Returns the attribute name.
      java.lang.String getStringValue()  
      <T> T getValue​(java.util.function.Function<byte[],​T> func)  
      int hashCode()  
      boolean hasName​(java.lang.String name)
      Returns whether the attribute name matches the supplied name.
      java.lang.String toString()  
      • Methods inherited from class java.lang.Object

        clone, finalize, getClass, notify, notifyAll, wait, wait, wait
    • Constructor Detail

      • NameValue

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

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

      • getName

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

        public byte[] getBinaryValue()
      • getStringValue

        public java.lang.String getStringValue()
      • getValue

        public <T> T getValue​(java.util.function.Function<byte[],​T> func)
      • hasName

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

        public java.lang.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​(java.lang.Object o)
        Overrides:
        equals in class java.lang.Object
      • hashCode

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

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object