Package org.exbin.xbup.core.ubnumber
Interface UBENatural
-
- All Superinterfaces:
java.io.Serializable
,UBStreamable
,XBAttribute
,XBEditableAttribute
- All Known Implementing Classes:
UBENat32
public interface UBENatural extends java.io.Serializable, UBStreamable, XBEditableAttribute
Interface for LRUB-encoded natural value with infinity constant.
-
-
Field Summary
Fields Modifier and Type Field Description static int
INFINITY_SIZE_UB
static long[]
XBUP_BLOCKREV_CATALOGPATH
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description int
getInt()
Gets short integer value.long
getLong()
Gets long integer value.long
getSegmentCount()
Gets count of long value segments.long
getValueSegment(long segmentIndex)
Gets long integer segment of value.boolean
isInfinity()
Reads infinity flag.boolean
isZero()
Returns if value is zero.void
setInfinity()
Sets value to infinity constant.void
setValue(int value)
Sets integer value.void
setValue(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
-
-
-
-
Field Detail
-
XBUP_BLOCKREV_CATALOGPATH
static final long[] XBUP_BLOCKREV_CATALOGPATH
-
INFINITY_SIZE_UB
static final int INFINITY_SIZE_UB
- See Also:
- Constant Field Values
-
-
Method Detail
-
getInt
int getInt() throws UBOverFlowException
Gets short integer value.- Returns:
- integer value
- Throws:
UBOverFlowException
- if value is out of range
-
getLong
long getLong() throws UBOverFlowException
Gets 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
-
setValue
void setValue(int value) throws UBOverFlowException
Sets integer value.- Parameters:
value
- integer value- Throws:
UBOverFlowException
-
setValue
void setValue(long value) throws UBOverFlowException
Sets 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 infinity flag.- Returns:
- true if value represents infinity
-
setInfinity
void setInfinity()
Sets value to infinity constant.
-
-