Package jadex.commons
Class ByteArrayWrapper
- java.lang.Object
-
- jadex.commons.ByteArrayWrapper
-
public class ByteArrayWrapper extends java.lang.ObjectWrapper to allow byte arrays as hash keys.
-
-
Field Summary
Fields Modifier and Type Field Description protected byte[]arrayThe 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 booleanequals(java.lang.Object obj)Compares two arrays.byte[]getArray()Gets the array.inthashCode()Creates a hash code.voidsetArray(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:
hashCodein classjava.lang.Object
-
equals
public boolean equals(java.lang.Object obj)
Compares two arrays.- Overrides:
equalsin classjava.lang.Object
-
-