Class ZephyrAccount

java.lang.Object
zephyr.wallet.model.ZephyrAccount

public class ZephyrAccount extends Object
Zephyr account model.
  • Constructor Details

    • ZephyrAccount

      public ZephyrAccount()
    • ZephyrAccount

      public ZephyrAccount(int index, String primaryAddress, ZephyrBalance balance, ZephyrBalance unlockedBalance, List<ZephyrSubaddress> subaddresses)
      Constructs an account.
      Parameters:
      index - is the account index
      primaryAddress - is the account's primary address
      balance - is the account's balance per asset
      unlockedBalance - is the account's unlocked balance per asset
      subaddresses - are the account's subaddresses (may be null)
  • Method Details

    • getIndex

      public Integer getIndex()
    • setIndex

      public void setIndex(Integer index)
    • getPrimaryAddress

      public String getPrimaryAddress()
    • setPrimaryAddress

      public void setPrimaryAddress(String primaryAddress)
    • getBalance

      public ZephyrBalance getBalance()
      Returns the account's balance per asset. It lists only the assets the account holds; an absent asset is zero (ZephyrBalance.get(String), ZephyrBalance.equals(Object)).
      Returns:
      the account's balance per asset in atomic units
    • setBalance

      public void setBalance(ZephyrBalance balance)
      Sets the account's balance per asset.
      Parameters:
      balance - is the account's balance per asset in atomic units
    • getUnlockedBalance

      public ZephyrBalance getUnlockedBalance()
      Returns the account's unlocked (spendable) balance per asset; an absent asset is zero.
      Returns:
      the account's unlocked balance per asset in atomic units
    • setUnlockedBalance

      public void setUnlockedBalance(ZephyrBalance unlockedBalance)
      Sets the account's unlocked balance per asset.
      Parameters:
      unlockedBalance - is the account's unlocked balance per asset in atomic units
    • getTag

      public String getTag()
    • setTag

      public void setTag(String tag)
    • getSubaddresses

      public List<ZephyrSubaddress> getSubaddresses()
    • setSubaddresses

      public void setSubaddresses(List<ZephyrSubaddress> subaddresses)
    • 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