Class KeyId


  • public class KeyId
    extends java.lang.Object
    The KeyId class represents the identifier for a particular key record. This identifier may be used to retrieve the key record from the database.

    Version:
    $Revision$ $Date$
    Author:
    Endi S. Dewata
    • Field Summary

      Fields 
      Modifier and Type Field Description
      protected java.math.BigInteger value  
    • Constructor Summary

      Constructors 
      Constructor Description
      KeyId​(int id)
      Creates a new KeyId from its integer representation.
      KeyId​(java.lang.String id)
      Creates a new KeyId from its string representation.
      KeyId​(java.math.BigInteger id)
      Creates a new KeyId from its BigInteger representation.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      boolean equals​(java.lang.Object obj)  
      int hashCode()  
      java.math.BigInteger toBigInteger()
      Converts the KeyId into its BigInteger representation.
      java.lang.String toHexString()
      Converts the KeyId into its hex string representation.
      java.lang.String toString()
      Converts the KeyId into its string representation.
      • Methods inherited from class java.lang.Object

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

      • value

        protected java.math.BigInteger value
    • Constructor Detail

      • KeyId

        public KeyId​(java.lang.String id)
        Creates a new KeyId from its string representation.

        Parameters:
        id - a string containing the decimal or hex value for the identifier.
      • KeyId

        public KeyId​(java.math.BigInteger id)
        Creates a new KeyId from its BigInteger representation.

        Parameters:
        id - a BigInteger containing the identifier.
      • KeyId

        public KeyId​(int id)
        Creates a new KeyId from its integer representation.

        Parameters:
        id - an integer containing the identifier.
    • Method Detail

      • toBigInteger

        public java.math.BigInteger toBigInteger()
        Converts the KeyId into its BigInteger representation.

        Returns:
        a BigInteger containing the identifier.
      • toString

        public java.lang.String toString()
        Converts the KeyId into its string representation. The string form can be stored in a database (such as the LDAP directory)

        Overrides:
        toString in class java.lang.Object
        Returns:
        a string containing the decimal (base 10) value for the identifier.
      • toHexString

        public java.lang.String toHexString()
        Converts the KeyId into its hex string representation. The string form can be stored in a database (such as the LDAP directory)
        Returns:
        a string containing the hex (hex 16) value for the identifier.
      • hashCode

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

        public boolean equals​(java.lang.Object obj)
        Overrides:
        equals in class java.lang.Object