Class JBBPFieldArrayDouble

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

public final class JBBPFieldArrayDouble extends JBBPAbstractArrayField<JBBPFieldDouble> implements JBBPNumericArray
Describes a double array.
Since:
1.4.0
See Also:
  • Constructor Details

    • JBBPFieldArrayDouble

      public JBBPFieldArrayDouble(JBBPNamedFieldInfo name, double[] 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 double[] getArray()
      get the value array
      Returns:
      the value array as a long array
    • size

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

      public JBBPFieldDouble getElementAt(int index)
      Description copied from class: JBBPAbstractArrayField
      Get element from the array for its index.
      Specified by:
      getElementAt in class JBBPAbstractArrayField<JBBPFieldDouble>
      Parameters:
      index - the array index
      Returns:
      the array element for its index
    • 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
    • getAsDouble

      public double getAsDouble(int index)
    • 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
    • getValueArrayAsObject

      public Object getValueArrayAsObject(boolean reverseBits)
      Description copied from class: JBBPAbstractArrayField
      Get the value array as an object.
      Specified by:
      getValueArrayAsObject in class JBBPAbstractArrayField<JBBPFieldDouble>
      Parameters:
      reverseBits - reverse bit order in values
      Returns:
      the value array as an object
    • 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]'