Class UnsignedBufferAsInt

Object
UnsignedBuffer
UnsignedBufferAsInt
Direct Known Subclasses:
UnsignedByteBuffer, UnsignedShortBuffer

public abstract class UnsignedBufferAsInt extends UnsignedBuffer
A UnsignedBuffer that exposes its internal types as int.

This means that an int is returned by getUnsigned and accepted by putUnsigned and related functions.

Author:
Owen Feehan
  • Constructor Details

    • UnsignedBufferAsInt

      protected UnsignedBufferAsInt(Buffer buffer)
      Construct with a delegate buffer.
      Parameters:
      buffer - buffer to use as a delegate.
  • Method Details

    • getUnsigned

      public abstract int getUnsigned()
      Gets an unsigned-byte (represented as a int) at the current buffer position.
      Returns:
      unsigned-byte (represented by a int)
    • getUnsigned

      public abstract int getUnsigned(int index)
      Gets an unsigned-byte (represented as a int) at a particular buffer position.
      Parameters:
      index - the buffer position
      Returns:
      unsigned-byte (represented by a int)
    • putUnsigned

      public abstract void putUnsigned(int value)
      Puts an unsigned-byte (represented by an int) at current buffer position.

      A conversion occurs from int to byte.

      Parameters:
      value - the unsigned-byte (represented by an int)
    • putUnsigned

      public abstract void putUnsigned(int index, int value)
      Puts an unsigned-byte (represented as a int) a particular buffer position.

      A conversion occurs from int to byte.

      Parameters:
      index - the buffer position
      value - the unsigned-byte (represented by an int)
    • toString

      public String toString()
      Print a description and the the first {link #MAX_NUMBER_ROWS_COLUMNS_IN_TO_STRING} rows and columns as values.
      Overrides:
      toString in class Object
    • equals

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

      protected boolean canEqual(Object other)
      Overrides:
      canEqual in class UnsignedBuffer
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class UnsignedBuffer