Class JBBPFieldArrayUInt

All Implemented Interfaces:
JBBPNamedField, JBBPNumericArray, Serializable, Iterable<JBBPFieldUInt>

public final class JBBPFieldArrayUInt extends JBBPAbstractArrayField<JBBPFieldUInt> implements JBBPNumericArray
Describes a long array.
Since:
1.0
See Also:
  • Constructor Details

    • JBBPFieldArrayUInt

      public JBBPFieldArrayUInt(JBBPNamedFieldInfo name, int[] array)
      The Constructor.
      Parameters:
      name - a field name info, it can be null
      array - a value array, it must not be null
  • Method Details

    • getArray

      public long[] getArray()
      get the value array
      Returns:
      the value array as a long array
    • getInternalArray

      public int[] getInternalArray()
      Get internal array of signed integers representing unsigned integers.
      Returns:
      the internal integer array, must not be null
      Since:
      2.0.4
    • size

      public int size()
      Description copied from class: JBBPAbstractArrayField
      Get number of elements in the array.
      Specified by:
      size in class JBBPAbstractArrayField<JBBPFieldUInt>
      Returns:
      the array size
    • getElementAt

      public JBBPFieldUInt getElementAt(int index)
      Description copied from class: JBBPAbstractArrayField
      Get element from the array for its index.
      Specified by:
      getElementAt in class JBBPAbstractArrayField<JBBPFieldUInt>
      Parameters:
      index - the array index
      Returns:
      the array element for its index
    • getValueArrayAsObject

      public Object getValueArrayAsObject(boolean reverseBits)
      Description copied from class: JBBPAbstractArrayField
      Get the value array as an object.
      Specified by:
      getValueArrayAsObject in class JBBPAbstractArrayField<JBBPFieldUInt>
      Parameters:
      reverseBits - reverse bit order in values
      Returns:
      the value array as an object
    • getAsInt

      public int getAsInt(int index)
      Description copied from interface: JBBPNumericArray
      Get element as integer.
      Specified by:
      getAsInt in interface JBBPNumericArray
      Parameters:
      index - index of element in array
      Returns:
      the element as integer
    • getAsLong

      public long getAsLong(int index)
      Description copied from interface: JBBPNumericArray
      Get element as long.
      Specified by:
      getAsLong in interface JBBPNumericArray
      Parameters:
      index - index of element in array
      Returns:
      the element as long
    • getAsBool

      public boolean getAsBool(int index)
      Description copied from interface: JBBPNumericArray
      Get element as boolean.
      Specified by:
      getAsBool in interface JBBPNumericArray
      Parameters:
      index - index of element in array
      Returns:
      the element as boolean
    • getTypeAsString

      public String getTypeAsString()
      Description copied from class: JBBPAbstractField
      Get the field type in string representation.
      Specified by:
      getTypeAsString in class JBBPAbstractField
      Returns:
      the string representation of field type, like 'int', 'long', 'bool [123]'