public class MosaicId extends java.lang.Object implements UnresolvedMosaicId
Constructor and Description |
---|
MosaicId(java.math.BigInteger id)
Create MosaicId from BigInteger id
|
MosaicId(MosaicNonce mosaicNonce,
Address owner)
Create MosaicId from a MosaicNonce and an Address
|
MosaicId(MosaicNonce mosaicNonce,
PublicAccount owner)
Create MosaicId from a MosaicNonce and a PublicAccount
|
MosaicId(java.lang.String hex)
Create MosaicId from mosaic Hex string
|
Modifier and Type | Method and Description |
---|---|
static MosaicId |
createFromNonce(MosaicNonce mosaicNonce,
Address owner)
Create MosaicId from a MosaicNonce and the owner Address
|
static MosaicId |
createFromNonce(MosaicNonce mosaicNonce,
PublicAccount owner)
Create MosaicId from a MosaicNonce and the owner PublicAccount
|
boolean |
equals(java.lang.Object o)
Compares mosaicIds for equality.
|
java.math.BigInteger |
getId()
Returns mosaic BigInteger id
|
java.lang.String |
getIdAsHex()
Gets the id as a hexadecimal string.
|
long |
getIdAsLong()
Returns mosaic id as a long
|
int |
hashCode() |
public MosaicId(java.lang.String hex)
hex
- the hex value.IllegalIdentifierException
- MosaicId identifierpublic MosaicId(java.math.BigInteger id)
id
- the mosaic id as BigInteger
.public MosaicId(MosaicNonce mosaicNonce, Address owner)
mosaicNonce
- the mosaic nonce.owner
- the address of the ownerpublic MosaicId(MosaicNonce mosaicNonce, PublicAccount owner)
mosaicNonce
- the mosaic nonce.owner
- the public account.public static MosaicId createFromNonce(MosaicNonce mosaicNonce, Address owner)
mosaicNonce
- the mosaic nonceowner
- thw account owner.MosaicId
.public static MosaicId createFromNonce(MosaicNonce mosaicNonce, PublicAccount owner)
mosaicNonce
- the mosaic nonceowner
- thw account owner.MosaicId
.public java.math.BigInteger getId()
getId
in interface UnresolvedMosaicId
public long getIdAsLong()
getIdAsLong
in interface UnresolvedMosaicId
public boolean equals(java.lang.Object o)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object
public java.lang.String getIdAsHex()
getIdAsHex
in interface UnresolvedMosaicId