Interface CentPrecisionMoneyDraft

All Superinterfaces:
Comparable<javax.money.MonetaryAmount>, javax.money.CurrencySupplier, Draft<CentPrecisionMoneyDraft>, javax.money.MonetaryAmount, MonetaryAmountConvertable, Money, javax.money.NumberSupplier, TypedMoneyDraft

public interface CentPrecisionMoneyDraft extends TypedMoneyDraft, Draft<CentPrecisionMoneyDraft>

This draft type is the alternative to Money.


Example to create an instance using the builder pattern

     CentPrecisionMoneyDraft centPrecisionMoneyDraft = CentPrecisionMoneyDraft.builder()
             .currencyCode("{currencyCode}")
             .build()
 
  • Field Details

  • Method Details

    • getFractionDigits

      Integer getFractionDigits()

      This field is optional for cent precision. If provided, it must be equal to the default number of fraction digits for the specified currency.

      Specified by:
      getFractionDigits in interface TypedMoneyDraft
      Returns:
      fractionDigits
    • setFractionDigits

      void setFractionDigits(Integer fractionDigits)

      This field is optional for cent precision. If provided, it must be equal to the default number of fraction digits for the specified currency.

      Specified by:
      setFractionDigits in interface TypedMoneyDraft
      Parameters:
      fractionDigits - value to be set
    • of

      factory method
      Returns:
      instance of CentPrecisionMoneyDraft
    • of

      factory method to create a shallow copy CentPrecisionMoneyDraft
      Parameters:
      template - instance to be copied
      Returns:
      copy instance
    • deepCopy

      factory method to create a deep copy of CentPrecisionMoneyDraft
      Parameters:
      template - instance to be copied
      Returns:
      copy instance
    • builder

      builder factory method for CentPrecisionMoneyDraft
      Returns:
      builder
    • builder

      create builder for CentPrecisionMoneyDraft instance
      Parameters:
      template - instance with prefilled values for the builder
      Returns:
      builder
    • withCentPrecisionMoneyDraft

      default <T> T withCentPrecisionMoneyDraft(Function<CentPrecisionMoneyDraft,T> helper)
      accessor map function
      Type Parameters:
      T - mapped type
      Parameters:
      helper - function to map the object
      Returns:
      mapped value
    • of

      static CentPrecisionMoneyDraft of(javax.money.MonetaryAmount monetaryAmount)
    • of

    • typeReference

      static com.fasterxml.jackson.core.type.TypeReference<CentPrecisionMoneyDraft> typeReference()
      gives a TypeReference for usage with Jackson DataBind
      Returns:
      TypeReference