Package zephyr.wallet.model
Class ZephyrTransfer
java.lang.Object
zephyr.wallet.model.ZephyrTransfer
- Direct Known Subclasses:
ZephyrIncomingTransfer,ZephyrOutgoingTransfer,ZephyrTransferQuery
Models a base transfer of funds to or from the wallet.
Transfers are either of type ZephyrIncomingTransfer or ZephyrOutgoingTransfer so this class is abstract.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionabstract ZephyrTransfercopy()booleanReturns the asset of this transfer as the core reports it.getTx()inthashCode()abstract Booleanmerge(ZephyrTransfer transfer) Updates this transfer by merging the latest information from the given transfer.setAccountIndex(Integer accountIndex) setAmount(BigInteger amount) setAssetType(String assetType) Sets the asset of this transfer.setTx(ZephyrTxWallet tx) toString()toString(int indent)
-
Constructor Details
-
ZephyrTransfer
public ZephyrTransfer() -
ZephyrTransfer
-
-
Method Details
-
copy
-
getTx
-
setTx
-
isOutgoing
-
isIncoming
-
getAmount
-
setAmount
-
getAccountIndex
-
setAccountIndex
-
getAssetType
Returns the asset of this transfer as the core reports it.- Returns:
- the asset name (see
ZephyrAssets; V1 names pass through unchanged), null if not reported
-
setAssetType
Sets the asset of this transfer.- Parameters:
assetType- is the asset name (seeZephyrAssets)- Returns:
- this transfer for chaining
-
merge
Updates this transfer by merging the latest information from the given transfer. Merging can modify or build references to the transfer given so it should not be re-used or it should be copied before calling this method.- Parameters:
transfer- is the transfer to merge into this one- Returns:
- the merged transfer
-
toString
-
toString
-
hashCode
public int hashCode() -
equals
-