Package jadex.commons
Class ByteArrayWrapper
- java.lang.Object
-
- jadex.commons.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.
-
Constructor Summary
Constructors Constructor Description ByteArrayWrapper()
Creates the wrapper.ByteArrayWrapper(byte[] array)
Creates the wrapper.
-
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.
-
-
-
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 classjava.lang.Object
-
equals
public boolean equals(java.lang.Object obj)
Compares two arrays.- Overrides:
equals
in classjava.lang.Object
-
-