Class ZephyrTransfer

java.lang.Object
zephyr.wallet.model.ZephyrTransfer
Direct Known Subclasses:
ZephyrIncomingTransfer, ZephyrOutgoingTransfer, ZephyrTransferQuery

public abstract class ZephyrTransfer extends Object
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 Details

    • ZephyrTransfer

      public ZephyrTransfer()
    • ZephyrTransfer

      public ZephyrTransfer(ZephyrTransfer transfer)
  • Method Details

    • copy

      public abstract ZephyrTransfer copy()
    • getTx

      public ZephyrTxWallet getTx()
    • setTx

      public ZephyrTransfer setTx(ZephyrTxWallet tx)
    • isOutgoing

      public Boolean isOutgoing()
    • isIncoming

      public abstract Boolean isIncoming()
    • getAmount

      public BigInteger getAmount()
    • setAmount

      public ZephyrTransfer setAmount(BigInteger amount)
    • getAccountIndex

      public Integer getAccountIndex()
    • setAccountIndex

      public ZephyrTransfer setAccountIndex(Integer accountIndex)
    • getAssetType

      public String 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

      public ZephyrTransfer setAssetType(String assetType)
      Sets the asset of this transfer.
      Parameters:
      assetType - is the asset name (see ZephyrAssets)
      Returns:
      this transfer for chaining
    • merge

      public ZephyrTransfer merge(ZephyrTransfer transfer)
      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

      public String toString()
      Overrides:
      toString in class Object
    • toString

      public String toString(int indent)
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • equals

      public boolean equals(Object obj)
      Overrides:
      equals in class Object