Interface Price
public interface Price
Price
Example to create an instance using the builder pattern
Example to create an instance using the builder pattern
Price price = Price.builder()
.id("{id}")
.value(valueBuilder -> valueBuilder)
.build()
-
Method Summary
Modifier and TypeMethodDescriptionstatic PriceBuilder
builder()
builder factory method for Pricestatic PriceBuilder
create builder for Price instancestatic Price
factory method to create a deep copy of Price@NotNull String
getId()
@NotNull @Valid Money
getValue()
static Price
of()
factory methodstatic Price
factory method to create a shallow copy Pricevoid
set idvoid
set valuestatic com.fasterxml.jackson.core.type.TypeReference<Price>
gives a TypeReference for usage with Jackson DataBinddefault <T> T
accessor map function
-
Method Details
-
getId
- Returns:
- id
-
getValue
- Returns:
- value
-
setId
set id- Parameters:
id
- value to be set
-
setValue
set value- Parameters:
value
- value to be set
-
of
factory method- Returns:
- instance of Price
-
of
factory method to create a shallow copy Price- Parameters:
template
- instance to be copied- Returns:
- copy instance
-
deepCopy
factory method to create a deep copy of Price- Parameters:
template
- instance to be copied- Returns:
- copy instance
-
builder
builder factory method for Price- Returns:
- builder
-
builder
create builder for Price instance- Parameters:
template
- instance with prefilled values for the builder- Returns:
- builder
-
withPrice
accessor map function- Type Parameters:
T
- mapped type- Parameters:
helper
- function to map the object- Returns:
- mapped value
-
typeReference
gives a TypeReference for usage with Jackson DataBind- Returns:
- TypeReference
-