Package gov.nasa.pds.objectAccess.table
Class NumericTextFieldAdapter
java.lang.Object
gov.nasa.pds.objectAccess.table.DefaultFieldAdapter
gov.nasa.pds.objectAccess.table.NumericTextFieldAdapter
- All Implemented Interfaces:
- FieldAdapter
public class NumericTextFieldAdapter extends DefaultFieldAdapter
Implements a field adapter for numeric fields stored in
 textual format, as in a character table.
- 
Constructor SummaryConstructors Constructor Description NumericTextFieldAdapter()
- 
Method SummaryModifier and Type Method Description BigIntegergetBigInteger(byte[] buf, int offset, int length, int startBit, int stopBit)Gets the field value as a Java BigInteger.bytegetByte(byte[] buf, int offset, int length, int startBit, int stopBit)Gets the field value as a Java byte.doublegetDouble(byte[] buf, int offset, int length, int startBit, int stopBit)Gets the field value as a Java double.floatgetFloat(byte[] buf, int offset, int length, int startBit, int stopBit)Gets the field value as a Java float.intgetInt(byte[] buf, int offset, int length, int startBit, int stopBit)Gets the field value as a Java int.longgetLong(byte[] buf, int offset, int length, int startBit, int stopBit)Gets the field value as a Java long.shortgetShort(byte[] buf, int offset, int length, int startBit, int stopBit)Gets the field value as a Java short.voidsetBigInteger(BigInteger value, int offset, int length, ByteBuffer buffer, boolean isRightJustified)Sets the field value as a Java BigInteger.voidsetByte(byte value, int offset, int length, ByteBuffer buffer, boolean isRightJustified)Sets the field value as a Java byte.voidsetDouble(double value, int offset, int length, ByteBuffer buffer, boolean isRightJustified)Sets the field value as a Java double.voidsetFloat(float value, int offset, int length, ByteBuffer buffer, boolean isRightJustified)Sets the field value as a Java float.voidsetInt(int value, int offset, int length, ByteBuffer buffer, boolean isRightJustified)Sets the field value as a Java int.voidsetLong(long value, int offset, int length, ByteBuffer buffer, boolean isRightJustified)Sets the field value as a Java long.voidsetShort(short value, int offset, int length, ByteBuffer buffer, boolean isRightJustified)Sets the field value as a Java short.
- 
Constructor Details- 
NumericTextFieldAdapterpublic NumericTextFieldAdapter()
 
- 
- 
Method Details- 
getBytepublic byte getByte(byte[] buf, int offset, int length, int startBit, int stopBit)Description copied from interface:FieldAdapterGets the field value as a Java byte.- Specified by:
- getBytein interface- FieldAdapter
- Overrides:
- getBytein class- DefaultFieldAdapter
- Parameters:
- buf- the byte array containing the field
- offset- the field offset
- length- the length of the field data
- startBit- the start bit, for bit fields
- stopBit- the stop bit, for bit fields
- Returns:
- the field value, as a short
 
- 
getShortpublic short getShort(byte[] buf, int offset, int length, int startBit, int stopBit)Description copied from interface:FieldAdapterGets the field value as a Java short.- Specified by:
- getShortin interface- FieldAdapter
- Overrides:
- getShortin class- DefaultFieldAdapter
- Parameters:
- buf- the byte array containing the field
- offset- the field offset
- length- the length of the field data
- startBit- the start bit, for bit fields
- stopBit- the stop bit, for bit fields
- Returns:
- the field value, as a short
 
- 
getIntpublic int getInt(byte[] buf, int offset, int length, int startBit, int stopBit)Description copied from interface:FieldAdapterGets the field value as a Java int.- Specified by:
- getIntin interface- FieldAdapter
- Overrides:
- getIntin class- DefaultFieldAdapter
- Parameters:
- buf- the byte array containing the field
- offset- the field offset
- length- the length of the field data
- startBit- the start bit, for bit fields
- stopBit- the stop bit, for bit fields
- Returns:
- the field value, as an int
 
- 
getLongpublic long getLong(byte[] buf, int offset, int length, int startBit, int stopBit)Description copied from interface:FieldAdapterGets the field value as a Java long.- Specified by:
- getLongin interface- FieldAdapter
- Overrides:
- getLongin class- DefaultFieldAdapter
- Parameters:
- buf- the byte array containing the field
- offset- the field offset
- length- the length of the field data
- startBit- the start bit, for bit fields
- stopBit- the stop bit, for bit fields
- Returns:
- the field value, as a long
 
- 
getFloatpublic float getFloat(byte[] buf, int offset, int length, int startBit, int stopBit)Description copied from interface:FieldAdapterGets the field value as a Java float.- Specified by:
- getFloatin interface- FieldAdapter
- Overrides:
- getFloatin class- DefaultFieldAdapter
- Parameters:
- buf- the byte array containing the field
- offset- the field offset
- length- the length of the field data
- startBit- the start bit, for bit fields
- stopBit- the stop bit, for bit fields
- Returns:
- the field value, as a float
 
- 
getDoublepublic double getDouble(byte[] buf, int offset, int length, int startBit, int stopBit)Description copied from interface:FieldAdapterGets the field value as a Java double.- Specified by:
- getDoublein interface- FieldAdapter
- Overrides:
- getDoublein class- DefaultFieldAdapter
- Parameters:
- buf- the byte array containing the field
- offset- the field offset
- length- the length of the field data
- startBit- the start bit, for bit fields
- stopBit- the stop bit, for bit fields
- Returns:
- the field value, as a double
 
- 
getBigIntegerDescription copied from interface:FieldAdapterGets the field value as a Java BigInteger.- Specified by:
- getBigIntegerin interface- FieldAdapter
- Overrides:
- getBigIntegerin class- DefaultFieldAdapter
- Parameters:
- buf- the byte array containing the field
- offset- the field offset
- length- the length of the field data
- startBit- the start bit, for bit fields
- stopBit- the stop bit, for bit fields
- Returns:
- the field value, as a BigInteger
 
- 
setBytepublic void setByte(byte value, int offset, int length, ByteBuffer buffer, boolean isRightJustified)Description copied from interface:FieldAdapterSets the field value as a Java byte.- Specified by:
- setBytein interface- FieldAdapter
- Overrides:
- setBytein class- DefaultFieldAdapter
- Parameters:
- value- the field value
- offset- the field offset
- length- the length of the value
- buffer- the byte buffer into which to set the value
- isRightJustified- true, if the string value should be right-justified
 
- 
setShortpublic void setShort(short value, int offset, int length, ByteBuffer buffer, boolean isRightJustified)Description copied from interface:FieldAdapterSets the field value as a Java short.- Specified by:
- setShortin interface- FieldAdapter
- Overrides:
- setShortin class- DefaultFieldAdapter
- Parameters:
- value- the field value
- offset- the field offset
- length- the length of the value
- buffer- the byte buffer into which to set the value
- isRightJustified- true, if the string value should be right-justified
 
- 
setIntDescription copied from interface:FieldAdapterSets the field value as a Java int.- Specified by:
- setIntin interface- FieldAdapter
- Overrides:
- setIntin class- DefaultFieldAdapter
- Parameters:
- value- the field value
- offset- the field offset
- length- the length of the value
- buffer- the byte buffer into which to set the value
- isRightJustified- true, if the string value should be right-justified
 
- 
setLongpublic void setLong(long value, int offset, int length, ByteBuffer buffer, boolean isRightJustified)Description copied from interface:FieldAdapterSets the field value as a Java long.- Specified by:
- setLongin interface- FieldAdapter
- Overrides:
- setLongin class- DefaultFieldAdapter
- Parameters:
- value- the field value
- offset- the field offset
- length- the length of the value
- buffer- the byte buffer into which to set the value
- isRightJustified- true, if the string value should be right-justified
 
- 
setFloatpublic void setFloat(float value, int offset, int length, ByteBuffer buffer, boolean isRightJustified)Description copied from interface:FieldAdapterSets the field value as a Java float.- Specified by:
- setFloatin interface- FieldAdapter
- Overrides:
- setFloatin class- DefaultFieldAdapter
- Parameters:
- value- the field value
- offset- the field offset
- length- the length of the value
- buffer- the byte buffer into which to set the value
- isRightJustified- true, if the string value should be right-justified
 
- 
setDoublepublic void setDouble(double value, int offset, int length, ByteBuffer buffer, boolean isRightJustified)Description copied from interface:FieldAdapterSets the field value as a Java double.- Specified by:
- setDoublein interface- FieldAdapter
- Overrides:
- setDoublein class- DefaultFieldAdapter
- Parameters:
- value- the field value
- offset- the field offset
- length- the length of the value
- buffer- the byte buffer into which to set the value
- isRightJustified- true, if the string value should be right-justified
 
- 
setBigIntegerpublic void setBigInteger(BigInteger value, int offset, int length, ByteBuffer buffer, boolean isRightJustified)Description copied from interface:FieldAdapterSets the field value as a Java BigInteger.- Specified by:
- setBigIntegerin interface- FieldAdapter
- Overrides:
- setBigIntegerin class- DefaultFieldAdapter
- Parameters:
- value- the field value
- offset- the field offset
- length- the length of the value
- buffer- the byte buffer into which to set the value
- isRightJustified- true, if the string value should be right-justified
 
 
-