Interface Price


public interface Price
Price
Example to create an instance using the builder pattern

     Price price = Price.builder()
             .id("{id}")
             .value(valueBuilder -> valueBuilder)
             .build()
 
  • Method Details

    • getId

      @NotNull @NotNull String getId()
      Returns:
      id
    • getValue

      @NotNull @Valid @NotNull @Valid Money getValue()
      Returns:
      value
    • setId

      void setId(String id)
      set id
      Parameters:
      id - value to be set
    • setValue

      void setValue(Money value)
      set value
      Parameters:
      value - value to be set
    • of

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

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

      @Nullable static Price deepCopy(@Nullable Price template)
      factory method to create a deep copy of Price
      Parameters:
      template - instance to be copied
      Returns:
      copy instance
    • builder

      static PriceBuilder builder()
      builder factory method for Price
      Returns:
      builder
    • builder

      static PriceBuilder builder(Price template)
      create builder for Price instance
      Parameters:
      template - instance with prefilled values for the builder
      Returns:
      builder
    • withPrice

      default <T> T withPrice(Function<Price,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<Price> typeReference()
      gives a TypeReference for usage with Jackson DataBind
      Returns:
      TypeReference