public class MapperUtils
extends java.lang.Object
Modifier and Type | Method and Description |
---|---|
static java.lang.String |
fromBigIntegerToHex(java.math.BigInteger value)
Creates a hex string form
BigInteger . |
static java.math.BigInteger |
fromHexToBigInteger(java.lang.String hex)
Creates a
BigInteger from the provided hex number. |
static java.lang.String |
getIdAsHex(UnresolvedMosaicId id)
Converts a namespace or a mosaic id to hex
|
static Address |
toAddress(java.lang.String encodedAddress)
Creates a
Address from an encoded address. |
static Address |
toAddressFromRawAddress(java.lang.String rawAddress)
Creates a
Address from the provided raw address. |
static MosaicId |
toMosaicId(java.lang.String hex)
Creates a
MosaicId from the provided hex string. |
static NamespaceId |
toNamespaceId(java.lang.String hex)
Creates a
NamespaceId from the provided hex string. |
static UnresolvedAddress |
toUnresolvedAddress(java.lang.String hex)
|
static UnresolvedAddress |
toUnresolvedAddressFromPlain(java.lang.String plainUnresolvedAddress)
Returns an unresolved address from a plain string like C0FB8AA409916260 (alias hex) or
TAHNZXQBC57AA7KJTMGS3PJPZBXN7DV5JHJU42A (address)
|
static UnresolvedMosaicId |
toUnresolvedMosaicId(java.lang.String hex)
Creates a
MosaicId or NamespaceId from the provided hex string. |
public static NamespaceId toNamespaceId(java.lang.String hex)
NamespaceId
from the provided hex string.hex
- the hex string with the idpublic static MosaicId toMosaicId(java.lang.String hex)
MosaicId
from the provided hex string.hex
- the hex string with the idMosaicId
from the hex number or null if the hex is nullpublic static UnresolvedMosaicId toUnresolvedMosaicId(java.lang.String hex)
MosaicId
or NamespaceId
from the provided hex string.hex
- the hex string with the idUnresolvedMosaicId
from the hex number or null if the hex is nullpublic static UnresolvedAddress toUnresolvedAddress(java.lang.String hex)
hex
- the hex string with the idUnresolvedAddress
from the hex number or null if the hex is nullpublic static Address toAddressFromRawAddress(java.lang.String rawAddress)
Address
from the provided raw address.rawAddress
- the rawAddressAddress
from the raw address or null if the parameter is nullpublic static java.math.BigInteger fromHexToBigInteger(java.lang.String hex)
BigInteger
from the provided hex number.hex
- the hex string with the idBigInteger
from the hex number or null if the hex is nullpublic static java.lang.String fromBigIntegerToHex(java.math.BigInteger value)
BigInteger
. The value must not be negativevalue
- the not negative BigInteger
to be converted to hexpublic static Address toAddress(java.lang.String encodedAddress)
Address
from an encoded address.encodedAddress
- the encodedAddressAddress
from the unresolved address or null if the parameter is nullpublic static java.lang.String getIdAsHex(UnresolvedMosaicId id)
id
- the id. It may be null.public static UnresolvedAddress toUnresolvedAddressFromPlain(java.lang.String plainUnresolvedAddress)
plainUnresolvedAddress
- plain address or alias hexUnresolvedAddress