Interface Monetary

All Superinterfaces:
Serializable
All Known Implementing Classes:
Coin, Fiat

public interface Monetary extends Serializable
Classes implementing this interface represent a monetary value, such as a Bitcoin or fiat amount.
  • Method Summary

    Modifier and Type
    Method
    Description
    long
    Returns the number of "smallest units" of this monetary value.
    int
     
    int
    Returns the absolute value of exponent of the value of a "smallest unit" in scientific notation.
  • Method Details

    • smallestUnitExponent

      int smallestUnitExponent()
      Returns the absolute value of exponent of the value of a "smallest unit" in scientific notation. For Bitcoin, a satoshi is worth 1E-8 so this would be 8.
    • getValue

      long getValue()
      Returns the number of "smallest units" of this monetary value. For Bitcoin, this would be the number of satoshis.
    • signum

      int signum()