Interface JBBPNumericField

All Superinterfaces:
JBBPInvertableBitOrder, JBBPNamedField
All Known Implementing Classes:
JBBPFieldBit, JBBPFieldBoolean, JBBPFieldByte, JBBPFieldDouble, JBBPFieldFloat, JBBPFieldInt, JBBPFieldLong, JBBPFieldShort, JBBPFieldUByte, JBBPFieldUInt, JBBPFieldUShort

public interface JBBPNumericField extends JBBPInvertableBitOrder, JBBPNamedField
The Interface describes a field which content can be represented as a numeric value.
Since:
1.0
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    Get the field value as boolean, usually if the value is 0 then false, true otherwise.
    double
    Get the field value as double.
    float
    Get the field value as float.
    int
    Get the field value as integer.
    long
    Get the field value as long

    Methods inherited from interface com.igormaznitsa.jbbp.model.JBBPInvertableBitOrder

    getAsInvertedBitOrder

    Methods inherited from interface com.igormaznitsa.jbbp.model.JBBPNamedField

    getNameInfo
  • Method Details

    • getAsInt

      int getAsInt()
      Get the field value as integer.
      Returns:
      the field value as integer
      Throws:
      JBBPNumericFieldValueConversionException - can be thrown if impossible to represent saved value as int
    • getAsDouble

      double getAsDouble()
      Get the field value as double.
      Returns:
      the field value as double
      Throws:
      JBBPNumericFieldValueConversionException - can be thrown if impossible to represent saved value as double
      Since:
      1.4.0
    • getAsFloat

      float getAsFloat()
      Get the field value as float.
      Returns:
      the field value as float
      Throws:
      JBBPNumericFieldValueConversionException - can be thrown if impossible to represent saved value as float
      Since:
      1.4.0
    • getAsLong

      long getAsLong()
      Get the field value as long
      Returns:
      the field value as long
      Throws:
      JBBPNumericFieldValueConversionException - can be thrown if impossible to represent saved value as long
    • getAsBool

      boolean getAsBool()
      Get the field value as boolean, usually if the value is 0 then false, true otherwise.
      Returns:
      the field value as boolean
      Throws:
      JBBPNumericFieldValueConversionException - can be thrown if impossible to represent saved value as boolean