Interface Variant
public interface Variant
Variant
Example to create an instance using the builder pattern
Example to create an instance using the builder pattern
Variant variant = Variant.builder()
.id(1)
.sku("{sku}")
.key("{key}")
.build()
-
Method Summary
Modifier and TypeMethodDescriptionstatic VariantBuilderbuilder()builder factory method for Variantstatic VariantBuildercreate builder for Variant instancecopyDeep()static Variantfactory method to create a deep copy of Variant@NotNull IntegergetId()@NotNull StringgetKey()@NotNull StringgetSku()static Variantof()factory methodstatic Variantfactory method to create a shallow copy Variantvoidset idvoidset keyvoidset skustatic com.fasterxml.jackson.core.type.TypeReference<Variant>gives a TypeReference for usage with Jackson DataBinddefault <T> TwithVariant(Function<Variant, T> helper) accessor map function
-
Method Details
-
getId
- Returns:
- id
-
getSku
- Returns:
- sku
-
getKey
- Returns:
- key
-
setId
set id- Parameters:
id- value to be set
-
setSku
set sku- Parameters:
sku- value to be set
-
setKey
set key- Parameters:
key- value to be set
-
of
factory method- Returns:
- instance of Variant
-
of
factory method to create a shallow copy Variant- Parameters:
template- instance to be copied- Returns:
- copy instance
-
copyDeep
Variant copyDeep() -
deepCopy
factory method to create a deep copy of Variant- Parameters:
template- instance to be copied- Returns:
- copy instance
-
builder
builder factory method for Variant- Returns:
- builder
-
builder
create builder for Variant instance- Parameters:
template- instance with prefilled values for the builder- Returns:
- builder
-
withVariant
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
-