Package gov.nasa.pds.objectAccess.array
Class DoubleAdapter
- java.lang.Object
-
- gov.nasa.pds.objectAccess.array.DoubleAdapter
-
- All Implemented Interfaces:
DataTypeAdapter
- Direct Known Subclasses:
ComplexDoubleAdapter
public class DoubleAdapter extends java.lang.Object implements DataTypeAdapter
Implements a data type adapter for double values.
-
-
Constructor Summary
Constructors Constructor Description DoubleAdapter(boolean isBigEndian)
Creates a new instance.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description double
getDouble(java.nio.ByteBuffer buf)
Gets the value as a double.int
getInt(java.nio.ByteBuffer buf)
Gets the value as an int.long
getLong(java.nio.ByteBuffer buf)
Gets the value as a long.protected double
getValue(java.nio.ByteBuffer buf)
-
-
-
Method Detail
-
getInt
public int getInt(java.nio.ByteBuffer buf)
Description copied from interface:DataTypeAdapter
Gets the value as an int.- Specified by:
getInt
in interfaceDataTypeAdapter
- Parameters:
buf
- the buffer from which to get the value- Returns:
- the value, as an int
-
getLong
public long getLong(java.nio.ByteBuffer buf)
Description copied from interface:DataTypeAdapter
Gets the value as a long.- Specified by:
getLong
in interfaceDataTypeAdapter
- Parameters:
buf
- the buffer from which to get the value- Returns:
- the value, as a long
-
getDouble
public double getDouble(java.nio.ByteBuffer buf)
Description copied from interface:DataTypeAdapter
Gets the value as a double.- Specified by:
getDouble
in interfaceDataTypeAdapter
- Parameters:
buf
- the buffer from which to get the value- Returns:
- the value, as a double
-
getValue
protected double getValue(java.nio.ByteBuffer buf)
-
-