Class SessionKey

java.lang.Object
com.nt.udc.processor.SequenceProcessor.SessionKey

public class SessionKey extends Object
Immutable. Just like the String class. I.E. once created, its value never changes.
  • Constructor Details

    • SessionKey

      public SessionKey(byte[] key)
      Create a new key using the input byte array. The contents of the input byte array is copied. Therefore, the user is free to change the input after creating the SessionKey, and it won't affect the key itself.
      Parameters:
      key - byte array of session key value
      Throws:
      NullPointerException - if key is null.
    • SessionKey

      public SessionKey(SessionKey key)
      Create a copy of the SessionKey key. Note that the 2 SessionKeys share the byte array, but since this class is immutable, nothing bad is gonna happen. :)
  • Method Details

    • equals

      public boolean equals(Object obj)
      2 ByteArray objects are equal if the contents of their byte[] holds the same values.
      Overrides:
      equals in class Object
    • hashCode

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

      public String toString()
      Overrides:
      toString in class Object