public interface IAddress extends Comparable<Object>
Modifier and Type | Method and Description |
---|---|
IAddress |
add(BigInteger offset)
Adds offset to address and returns new address object
which is the result
|
IAddress |
add(long offset)
Adds offset to address and returns new address object
which is the result
Note: This method has an offset limit of Long.MAX and Long.MIN, which under some addressing schemes may impose an unnecessary limitation, see IAddress.add(BigInteger offset) to handle larger offsets. |
BigInteger |
distanceTo(IAddress other)
Returns distance to address.
|
boolean |
equals(Object addr)
Returns whether this address equals the given object.
|
int |
getCharsNum()
Returns amount of symbols in hex representation.
|
BigInteger |
getMaxOffset()
Returns maximal offset possible for address.
|
int |
getSize()
Returns the address size in bytes.
|
BigInteger |
getValue()
Returns the value of the address.
|
boolean |
isMax()
Return true if address is maximal, i.e.
|
boolean |
isZero()
Return true if address is zero, i.e.
|
String |
toBinaryAddressString()
Converts address to the binary representation with '0b' prefix and
with all leading zeros.
|
String |
toHexAddressString()
Converts address to the hex representation with '0x' prefix and
with all leading zeros.
|
String |
toString()
Identical to toString(10)
|
String |
toString(int radix)
Converts address to string as an unsigned number with given radix
|
compareTo
IAddress add(BigInteger offset)
offset
- to addIAddress add(long offset)
IAddress.add(BigInteger offset)
to handle larger offsets.offset
- to addBigInteger getMaxOffset()
BigInteger distanceTo(IAddress other)
other
- address which distance is calculated to.BigInteger getValue()
boolean equals(Object addr)
boolean isZero()
boolean isMax()
String toString(int radix)
radix
- to use for string conversionString toString()
String toHexAddressString()
String toBinaryAddressString()
int getCharsNum()
int getSize()
Copyright (c) IBM Corp. and others 2004, 2020. All Rights Reserved.