public final class CurrencyBuilder
extends java.lang.Object
Currency
. This builders helps the user creating the Currency
objects
when setting up the RepositoryFactoryConfiguration
.Constructor and Description |
---|
CurrencyBuilder(UnresolvedMosaicId unresolvedMosaicId,
int divisibility) |
Modifier and Type | Method and Description |
---|---|
Currency |
build()
Once the builder is configured, call this method to create the
Currency |
int |
getDivisibility() |
java.util.Optional<MosaicId> |
getMosaicId() |
java.util.Optional<NamespaceId> |
getNamespaceId() |
UnresolvedMosaicId |
getUnresolvedMosaicId() |
boolean |
isRestrictable() |
boolean |
isSupplyMutable() |
boolean |
isTransferable() |
CurrencyBuilder |
withMosaicId(MosaicId mosaicId)
Helper method to setup the mosiac id.
|
CurrencyBuilder |
withNamespaceId(NamespaceId namespaceId)
Helper method to setup the namespace id.
|
CurrencyBuilder |
withRestrictable(boolean restrictable)
Helper method to setup the restrictable flag.
|
CurrencyBuilder |
withSupplyMutable(boolean supplyMutable)
Helper method to setup the supplyMutable flag.
|
CurrencyBuilder |
withTransferable(boolean transferable)
Helper method to setup the transferable flag.
|
public CurrencyBuilder(UnresolvedMosaicId unresolvedMosaicId, int divisibility)
public CurrencyBuilder withMosaicId(MosaicId mosaicId)
mosaicId
- the mosaic idpublic CurrencyBuilder withNamespaceId(NamespaceId namespaceId)
namespaceId
- the namespace idpublic CurrencyBuilder withTransferable(boolean transferable)
transferable
- the transferablepublic CurrencyBuilder withSupplyMutable(boolean supplyMutable)
supplyMutable
- the supplyMutablepublic CurrencyBuilder withRestrictable(boolean restrictable)
restrictable
- the restrictablepublic Currency build()
Currency
public UnresolvedMosaicId getUnresolvedMosaicId()
public int getDivisibility()
public java.util.Optional<MosaicId> getMosaicId()
public java.util.Optional<NamespaceId> getNamespaceId()
public boolean isTransferable()
public boolean isSupplyMutable()
public boolean isRestrictable()