|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.opends.server.types.ByteArray
@PublicAPI(stability=UNCOMMITTED,
mayInstantiate=false,
mayExtend=false,
mayInvoke=true)
public final class ByteArray
This class provides a data structure that holds a byte array but
also includes the necessary equals and hashCode
methods to make it suitable for use in maps.
| Constructor Summary | |
|---|---|
ByteArray(byte[] array)
Creates a new ByteArray object that wraps the provided
array. |
|
| Method Summary | |
|---|---|
byte[] |
array()
Retrieves the array wrapped by this ByteArray object. |
boolean |
equals(java.lang.Object o)
Indicates whether the provided object is equal to this ByteArray. |
int |
hashCode()
Retrieves a hash code for this ByteArray. |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public ByteArray(byte[] array)
ByteArray object that wraps the provided
array.
array - The array to be wrapped with this
ByteArray.| Method Detail |
|---|
public byte[] array()
ByteArray object.
ByteArray object.public int hashCode()
ByteArray. It will be the
sum of all of the bytes contained in the wrapped array.
hashCode in class java.lang.ObjectByteArray.public boolean equals(java.lang.Object o)
ByteArray. In order for it to be considered equal, the
provided object must be a non-null ByteArray object with
a wrapped array containing the same bytes in the same order.
equals in class java.lang.Objecto - The object for which to make the determination.
true if the provided object is a
ByteArray whose content is equal to that of this
ByteArray, or false if not.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||