Package org.exbin.xbup.core.ubnumber
Interface UBEReal
- 
public interface UBERealInterface for LRUB-encoded real value with infinity constants. 
- 
- 
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description UBNaturalgetBase()Gets base part of real value.doublegetDouble()Gets double value.floatgetFloat()Gets float value.intgetInt()Gets short integer value.longgetLong()Gets long integer value.UBNaturalgetMantissa()Gets mantissa part of real value.booleanisInfinity()Reads positive or negative infinity flag.booleanisNegativeInfinity()Reads negative infinity flag.booleanisPositiveInfinity()Reads positive infinity flag.booleanisZero()Returns if value is zero.voidsetNegativeInfinity()Sets value to negative infinity constant.voidsetPositiveInfinity()Sets value to positive infinity constant.voidsetValue(double value)Sets double value.voidsetValue(float value)Sets float value.voidsetValue(int value)Sets integer value.voidsetValue(long value)Sets long integer value. 
 - 
 
- 
- 
Method Detail
- 
getInt
int getInt() throws UBOverFlowExceptionGets short integer value.- Returns:
 - integer value
 - Throws:
 UBOverFlowException- if value is out of range
 
- 
getLong
long getLong() throws UBOverFlowExceptionGets long integer value.- Returns:
 - long integer value
 - Throws:
 UBOverFlowException- if value is out of range
 
- 
isZero
boolean isZero()
Returns if value is zero.- Returns:
 - true if value equals zero
 
 
- 
getFloat
float getFloat() throws UBOverFlowExceptionGets float value.- Returns:
 - float value
 - Throws:
 UBOverFlowException- if value is out of range
 
- 
getDouble
double getDouble() throws UBOverFlowExceptionGets double value.- Returns:
 - double value
 - Throws:
 UBOverFlowException- if value is out of range
 
- 
setValue
void setValue(int value) throws UBOverFlowExceptionSets integer value.- Parameters:
 value- integer value- Throws:
 UBOverFlowException
 
- 
setValue
void setValue(long value) throws UBOverFlowExceptionSets long integer value.- Parameters:
 value- long integer value- Throws:
 UBOverFlowException
 
- 
setValue
void setValue(float value) throws UBOverFlowExceptionSets float value.- Parameters:
 value- float value- Throws:
 UBOverFlowException
 
- 
setValue
void setValue(double value) throws UBOverFlowExceptionSets double value.- Parameters:
 value- double value- Throws:
 UBOverFlowException
 
- 
getBase
@Nonnull UBNatural getBase()
Gets base part of real value.- Returns:
 - base part
 
 
- 
getMantissa
@Nonnull UBNatural getMantissa()
Gets mantissa part of real value.- Returns:
 - mantissa part
 
 
- 
isInfinity
boolean isInfinity()
Reads positive or negative infinity flag.- Returns:
 - true if value represents infinity
 
 
- 
isPositiveInfinity
boolean isPositiveInfinity()
Reads positive infinity flag.- Returns:
 - true if value represents infinity
 
 
- 
isNegativeInfinity
boolean isNegativeInfinity()
Reads negative infinity flag.- Returns:
 - true if value represents infinity
 
 
- 
setPositiveInfinity
void setPositiveInfinity()
Sets value to positive infinity constant. 
- 
setNegativeInfinity
void setNegativeInfinity()
Sets value to negative infinity constant. 
 - 
 
 -