Package com.igormaznitsa.jbbp.model
Class JBBPFieldFloat
java.lang.Object
com.igormaznitsa.jbbp.model.JBBPAbstractField
com.igormaznitsa.jbbp.model.JBBPFieldFloat
- All Implemented Interfaces:
JBBPInvertableBitOrder,JBBPNamedField,JBBPNumericField,Serializable
Describes a float field.
- Since:
- 1.4.0
- See Also:
-
Field Summary
FieldsFields inherited from class com.igormaznitsa.jbbp.model.JBBPAbstractField
fieldNameInfo, payload -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanGet the field value as boolean, usually if the value is 0 then false, true otherwise.doubleGet the field value as double.floatGet the field value as float.intgetAsInt()Get the field value as integer.longGet the value in inverted bit order.longGet the field value as longGet the field type in string representation.Methods inherited from class com.igormaznitsa.jbbp.model.JBBPAbstractField
getFieldName, getFieldPath, getNameInfo, getPayload, setPayloadMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.igormaznitsa.jbbp.model.JBBPNamedField
getNameInfo
-
Field Details
-
TYPE_NAME
- See Also:
-
-
Constructor Details
-
JBBPFieldFloat
The Constructor.- Parameters:
name- a field name info, it can be null.value- the field value
-
-
Method Details
-
getAsFloat
public float getAsFloat()Description copied from interface:JBBPNumericFieldGet the field value as float.- Specified by:
getAsFloatin interfaceJBBPNumericField- Returns:
- the field value as float
-
getAsDouble
public double getAsDouble()Description copied from interface:JBBPNumericFieldGet the field value as double.- Specified by:
getAsDoublein interfaceJBBPNumericField- Returns:
- the field value as double
-
getAsInt
public int getAsInt()Description copied from interface:JBBPNumericFieldGet the field value as integer.- Specified by:
getAsIntin interfaceJBBPNumericField- Returns:
- the field value as integer
-
getAsLong
public long getAsLong()Description copied from interface:JBBPNumericFieldGet the field value as long- Specified by:
getAsLongin interfaceJBBPNumericField- Returns:
- the field value as long
-
getAsBool
public boolean getAsBool()Description copied from interface:JBBPNumericFieldGet the field value as boolean, usually if the value is 0 then false, true otherwise.- Specified by:
getAsBoolin interfaceJBBPNumericField- Returns:
- the field value as boolean
-
getAsInvertedBitOrder
public long getAsInvertedBitOrder()Description copied from interface:JBBPInvertableBitOrderGet the value in inverted bit order.- Specified by:
getAsInvertedBitOrderin interfaceJBBPInvertableBitOrder- Returns:
- the value in inverted bit order
-
getTypeAsString
Description copied from class:JBBPAbstractFieldGet the field type in string representation.- Specified by:
getTypeAsStringin classJBBPAbstractField- Returns:
- the string representation of field type, like 'int', 'long', 'bool [123]'
-