Package jadex.commons

Class ByteArrayWrapper


  • public class ByteArrayWrapper
    extends java.lang.Object
    Wrapper to allow byte arrays as hash keys.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      protected byte[] array
      The wrapped byte array.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      boolean equals​(java.lang.Object obj)
      Compares two arrays.
      byte[] getArray()
      Gets the array.
      int hashCode()
      Creates a hash code.
      void setArray​(byte[] array)
      Sets the array.
      • Methods inherited from class java.lang.Object

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

      • array

        protected byte[] array
        The wrapped byte array.
    • Constructor Detail

      • ByteArrayWrapper

        public ByteArrayWrapper()
        Creates the wrapper.
      • ByteArrayWrapper

        public ByteArrayWrapper​(byte[] array)
        Creates the wrapper.
    • Method Detail

      • getArray

        public byte[] getArray()
        Gets the array.
        Returns:
        The array.
      • setArray

        public void setArray​(byte[] array)
        Sets the array.
        Parameters:
        array - The array.
      • hashCode

        public int hashCode()
        Creates a hash code.
        Overrides:
        hashCode in class java.lang.Object
      • equals

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