Module java.money
Package javax.money

Interface MonetaryRounding

All Superinterfaces:
MonetaryOperator

public interface MonetaryRounding
extends MonetaryOperator
Interface representing a monetary rounding. Rounding must not necessarily represent roundings in a pure arithmetical sense. Basically a rounding can scale an amount arbitrarily.

Implementation specification

Implementations of this interface must be
  • final
  • immutable
  • thread-safe
Implementations of this interface should be
  • serializable
  • Method Summary

    Modifier and Type Method Description
    RoundingContext getRoundingContext()
    Access the rounding's context, which gives more details of the rounding instances such as The rounding's name (required) Its provider (required) Its base currency its scale and rounding mode any other attributes useful to describe the rounding

    Methods inherited from interface javax.money.MonetaryOperator

    apply
  • Method Details

    • getRoundingContext

      RoundingContext getRoundingContext()
      Access the rounding's context, which gives more details of the rounding instances such as
      • The rounding's name (required)
      • Its provider (required)
      • Its base currency
      • its scale and rounding mode
      • any other attributes useful to describe the rounding
      Returns:
      the rounding's context, never null.