public class NamespaceId extends java.lang.Object implements UnresolvedMosaicId, UnresolvedAddress
Constructor and Description |
---|
NamespaceId(java.lang.String hex)
Create NamespaceId from namespace Hex string
|
Modifier and Type | Method and Description |
---|---|
static NamespaceId |
createFromId(java.math.BigInteger id)
Create NamespaceId from BigInteger id
|
static NamespaceId |
createFromIdAndFullName(java.math.BigInteger id,
java.lang.String fullName)
Creates a NamespaceId when the id and the full name is known.
|
static NamespaceId |
createFromName(java.lang.String namespaceName)
Create NamespaceId from namespace string name (ex: nem or domain.subdom.subdome)
|
static NamespaceId |
createFromNameAndParentId(java.lang.String namespaceName,
java.math.BigInteger parentId)
Create NamespaceId from namespace string name (ex: nem or domain.subdom.subdome) and parent id
|
static NamespaceId |
createFromNameAndParentName(java.lang.String namespaceName,
java.lang.String parentNamespaceName)
Create NamespaceId from namespace string name (ex: nem or domain.subdom.subdome) and parent
namespace name
|
java.lang.String |
encoded(NetworkType networkType) |
boolean |
equals(java.lang.Object o) |
java.util.Optional<java.lang.String> |
getFullName()
Returns optional namespace full name, with subnamespaces if it's the case.
|
java.math.BigInteger |
getId()
Returns namespace BigInteger id
|
java.lang.String |
getIdAsHex()
Gets the id as a hexadecimal string.
|
long |
getIdAsLong()
Returns namespace id as a long
|
static java.util.List<java.math.BigInteger> |
getNamespacePath(java.lang.String namespaceName)
Returns a list of BigInteger ids for a namespace path (ex: nem or domain.subdom.subdome)
|
int |
hashCode() |
java.lang.String |
plain() |
public NamespaceId(java.lang.String hex)
hex
- the hex value.IllegalIdentifierException
- NamespaceId identifierpublic static NamespaceId createFromName(java.lang.String namespaceName)
namespaceName
- the namespace name.NamespaceId
public static NamespaceId createFromIdAndFullName(java.math.BigInteger id, java.lang.String fullName)
id
- the id.fullName
- the full name that includes the parent namespaces (ex: nem or
domain.subdom.subdome)NamespaceId
public static NamespaceId createFromNameAndParentId(java.lang.String namespaceName, java.math.BigInteger parentId)
namespaceName
- the namespace name.parentId
- the parent id.NamespaceId
public static NamespaceId createFromNameAndParentName(java.lang.String namespaceName, java.lang.String parentNamespaceName)
namespaceName
- the namespace name.parentNamespaceName
- the parent's namespace name.NamespaceId
public static NamespaceId createFromId(java.math.BigInteger id)
id
- the namespace id as BigInteger
.NamespaceId
public static java.util.List<java.math.BigInteger> getNamespacePath(java.lang.String namespaceName)
namespaceName
- the namespace name.public java.math.BigInteger getId()
getId
in interface UnresolvedMosaicId
public long getIdAsLong()
getIdAsLong
in interface UnresolvedMosaicId
public java.util.Optional<java.lang.String> getFullName()
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 encoded(NetworkType networkType)
encoded
in interface UnresolvedAddress
networkType
- the network type.SerializationUtils
public java.lang.String plain()
plain
in interface UnresolvedAddress
public java.lang.String getIdAsHex()
getIdAsHex
in interface UnresolvedMosaicId