Interface MoneyOverflowError

All Superinterfaces:
ErrorObject

public interface MoneyOverflowError extends ErrorObject

Returned when a Money operation overflows the 64-bit integer range. See Money usage for more information.


Example to create an instance using the builder pattern

     MoneyOverflowError moneyOverflowError = MoneyOverflowError.builder()
             .message("{message}")
             .build()
 
  • Field Details

  • Method Details

    • getCode

      @NotNull @NotNull String getCode()
      Description copied from interface: ErrorObject

      Error identifier.

      Specified by:
      getCode in interface ErrorObject
      Returns:
      code
    • getMessage

      @NotNull @NotNull String getMessage()

      "A Money operation resulted in an overflow."

      Specified by:
      getMessage in interface ErrorObject
      Returns:
      message
    • setMessage

      void setMessage(String message)

      "A Money operation resulted in an overflow."

      Specified by:
      setMessage in interface ErrorObject
      Parameters:
      message - value to be set
    • of

      static MoneyOverflowError of()
      factory method
      Returns:
      instance of MoneyOverflowError
    • of

      static MoneyOverflowError of(MoneyOverflowError template)
      factory method to create a shallow copy MoneyOverflowError
      Parameters:
      template - instance to be copied
      Returns:
      copy instance
    • deepCopy

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

      static MoneyOverflowErrorBuilder builder()
      builder factory method for MoneyOverflowError
      Returns:
      builder
    • builder

      static MoneyOverflowErrorBuilder builder(MoneyOverflowError template)
      create builder for MoneyOverflowError instance
      Parameters:
      template - instance with prefilled values for the builder
      Returns:
      builder
    • withMoneyOverflowError

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

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