Class DoubleAdapter

java.lang.Object
gov.nasa.pds.objectAccess.array.DoubleAdapter
All Implemented Interfaces:
DataTypeAdapter

public class DoubleAdapter
extends Object
implements DataTypeAdapter
Implements a data type adapter for double values.
  • Constructor Details

    • DoubleAdapter

      public DoubleAdapter​(boolean isBigEndian)
      Creates a new instance.
      Parameters:
      isBigEndian - true, if element is big-endian
  • Method Details

    • getInt

      public int getInt​(ByteBuffer buf)
      Description copied from interface: DataTypeAdapter
      Gets the value as an int.
      Specified by:
      getInt in interface DataTypeAdapter
      Parameters:
      buf - the buffer from which to get the value
      Returns:
      the value, as an int
    • getLong

      public long getLong​(ByteBuffer buf)
      Description copied from interface: DataTypeAdapter
      Gets the value as a long.
      Specified by:
      getLong in interface DataTypeAdapter
      Parameters:
      buf - the buffer from which to get the value
      Returns:
      the value, as a long
    • getDouble

      public double getDouble​(ByteBuffer buf)
      Description copied from interface: DataTypeAdapter
      Gets the value as a double.
      Specified by:
      getDouble in interface DataTypeAdapter
      Parameters:
      buf - the buffer from which to get the value
      Returns:
      the value, as a double