io.vertx.pgclient.data

## Class Money

- java.lang.Object
- - io.vertx.pgclient.data.Money

-     public class Money
      extends Object

  The PostgreSQL MONEY type. This has the `integer part` and `decimal part` of the value without loss of information. `bigDecimalValue()` returns the value without loss of information `doubleValue()` ()} returns the value possible loss of information

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `Money()`
    `Money(long integerPart, int decimalPart)`
    `Money(Number value)`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `BigDecimal` | `bigDecimalValue()`
    `double` | `doubleValue()`
    `boolean` | `equals(Object o)`
    `int` | `getDecimalPart()`
    `long` | `getIntegerPart()`
    `int` | `hashCode()`
    `Money` | `setDecimalPart(int part)` Set the decimal part of the monetary value.
    `Money` | `setIntegerPart(long part)` Set the integer part of the monetary value.
    `String` | `toString()`

    - ### Methods inherited from class java.lang.Object

      `clone, finalize, getClass, notify, notifyAll, wait, wait, wait`

- - ### Constructor Detail

    - #### Money

          public Money(long integerPart,
                       int decimalPart)

    - #### Money

          public Money(Number value)

    - #### Money

          public Money()

  - ### Method Detail

    - #### getIntegerPart

          public long getIntegerPart()

    - #### getDecimalPart

          public int getDecimalPart()

    - #### setIntegerPart

          public Money setIntegerPart(long part)

      Set the integer part of the monetary value.

      This value must belong to the range `]Long.MAX_VALUE / 100, Long.MIN_VALUE / 100[`

      Parameters:
        `part` - the integer part of the value
      Returns:
        this object

    - #### setDecimalPart

          public Money setDecimalPart(int part)

      Set the decimal part of the monetary value.

      This value must belong to the range `[0, 100]`

      Parameters:
        `part` - decimal part
      Returns:
        this object

    - #### bigDecimalValue

          public BigDecimal bigDecimalValue()

      Returns:
        the monetary amount as a big decimal without loss of information

    - #### doubleValue

          public double doubleValue()

      Returns:
        the monetary amount as a double with possible loss of information

    - #### equals

          public boolean equals(Object o)

      Overrides:
        `equals` in class `Object`

    - #### hashCode

          public int hashCode()

      Overrides:
        `hashCode` in class `Object`

    - #### toString

          public String toString()

      Overrides:
        `toString` in class `Object`

Copyright © 2021 Eclipse. All rights reserved.