Package org.exbin.xbup.core.ubnumber
Interface UBEInteger
-
- All Superinterfaces:
java.io.Serializable,UBStreamable,XBAttribute,XBEditableAttribute
public interface UBEInteger extends java.io.Serializable, UBStreamable, XBEditableAttribute
Interface for LRUB-encoded integer value with infinity constants.
-
-
Field Summary
Fields Modifier and Type Field Description static long[]XBUP_BLOCKREV_CATALOGPATH
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description intgetInt()Gets short integer value.longgetLong()Gets long integer value.longgetSegmentCount()Gets count of long value segments.longgetValueSegment(long segmentIndex)Gets long integer segment of value.booleanisInfinity()Reads positive or negative infinity flag.booleanisNegativeInfinity()Reads negative infinity flag.booleanisPositiveInfinity()Reads positive infinity flag.voidsetNegativeInfinity()Sets value to negative infinity constant.voidsetPositiveInfinity()Sets value to positive infinity constant.voidsetValue(int value)Sets integer value.voidsetValue(long value)Sets long integer value.-
Methods inherited from interface org.exbin.xbup.core.ubnumber.UBStreamable
fromStreamUB, getSizeUB, toStreamUB
-
Methods inherited from interface org.exbin.xbup.core.parser.token.XBAttribute
convertToNatural, getNaturalInt, getNaturalLong, isNaturalZero
-
Methods inherited from interface org.exbin.xbup.core.parser.token.XBEditableAttribute
convertFromNatural, setNaturalInt, setNaturalLong, setNaturalZero
-
-
-
-
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
-
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
-
getSegmentCount
long getSegmentCount()
Gets count of long value segments.- Returns:
- count of long segments
-
getValueSegment
long getValueSegment(long segmentIndex)
Gets long integer segment of value.- Parameters:
segmentIndex- index of segment, 0 for lowest value- Returns:
- long integer
-
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.
-
-