Interface ItemState
public interface ItemState
ItemState
Example to create an instance using the builder pattern
Example to create an instance using the builder pattern
ItemState itemState = ItemState.builder()
.quantity(1)
.state(stateBuilder -> stateBuilder)
.build()
-
Method Summary
Modifier and TypeMethodDescriptionstatic ItemStateBuilder
builder()
builder factory method for ItemStatestatic ItemStateBuilder
create builder for ItemState instancestatic ItemState
factory method to create a deep copy of ItemState@NotNull Integer
@NotNull @Valid Reference
getState()
static ItemState
of()
factory methodstatic ItemState
factory method to create a shallow copy ItemStatevoid
setQuantity
(Integer quantity) set quantityvoid
set statestatic com.fasterxml.jackson.core.type.TypeReference<ItemState>
gives a TypeReference for usage with Jackson DataBinddefault <T> T
withItemState
(Function<ItemState, T> helper) accessor map function
-
Method Details
-
getQuantity
- Returns:
- quantity
-
getState
- Returns:
- state
-
setQuantity
set quantity- Parameters:
quantity
- value to be set
-
setState
set state- Parameters:
state
- value to be set
-
of
factory method- Returns:
- instance of ItemState
-
of
factory method to create a shallow copy ItemState- Parameters:
template
- instance to be copied- Returns:
- copy instance
-
deepCopy
factory method to create a deep copy of ItemState- Parameters:
template
- instance to be copied- Returns:
- copy instance
-
builder
builder factory method for ItemState- Returns:
- builder
-
builder
create builder for ItemState instance- Parameters:
template
- instance with prefilled values for the builder- Returns:
- builder
-
withItemState
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
-