Class ImmutableByteArray

java.lang.Object
org.drasyl.util.ImmutableByteArray

@UnstableApi public final class ImmutableByteArray extends Object
Immutable byte array implementation, that do not allow any modifications to the original input.
  • Method Details

    • of

      public static ImmutableByteArray of(byte[] array)
      Copy the given array and stores it as immutable object.
      Parameters:
      array - the array to copy
      Returns:
      an immutable byte array
    • getArray

      public byte[] getArray()
    • size

      public int size()
    • isEmpty

      public boolean isEmpty()
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

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

      public String toString()
      Overrides:
      toString in class Object