Interface AttributeLocalizedEnumValue
public interface AttributeLocalizedEnumValue
A localized enum value must be unique within the enum, else a DuplicateEnumValues error is returned.
Example to create an instance using the builder pattern
AttributeLocalizedEnumValue attributeLocalizedEnumValue = AttributeLocalizedEnumValue.builder()
.key("{key}")
.label(labelBuilder -> labelBuilder)
.build()
-
Method Summary
Modifier and TypeMethodDescriptionbuilder()
builder factory method for AttributeLocalizedEnumValuebuilder
(AttributeLocalizedEnumValue template) create builder for AttributeLocalizedEnumValue instancestatic AttributeLocalizedEnumValue
deepCopy
(AttributeLocalizedEnumValue template) factory method to create a deep copy of AttributeLocalizedEnumValue@NotNull String
getKey()
Key of the value used as a programmatic identifier, for example in facets & filters.@NotNull @Valid LocalizedString
getLabel()
Descriptive, localized label of the value.static AttributeLocalizedEnumValue
of()
factory methodstatic AttributeLocalizedEnumValue
of
(AttributeLocalizedEnumValue template) factory method to create a shallow copy AttributeLocalizedEnumValuevoid
Key of the value used as a programmatic identifier, for example in facets & filters.void
setLabel
(LocalizedString label) Descriptive, localized label of the value.static com.fasterxml.jackson.core.type.TypeReference<AttributeLocalizedEnumValue>
gives a TypeReference for usage with Jackson DataBinddefault <T> T
accessor map function
-
Method Details
-
getKey
Key of the value used as a programmatic identifier, for example in facets & filters.
- Returns:
- key
-
getLabel
Descriptive, localized label of the value.
- Returns:
- label
-
setKey
Key of the value used as a programmatic identifier, for example in facets & filters.
- Parameters:
key
- value to be set
-
setLabel
Descriptive, localized label of the value.
- Parameters:
label
- value to be set
-
of
factory method- Returns:
- instance of AttributeLocalizedEnumValue
-
of
factory method to create a shallow copy AttributeLocalizedEnumValue- Parameters:
template
- instance to be copied- Returns:
- copy instance
-
deepCopy
@Nullable static AttributeLocalizedEnumValue deepCopy(@Nullable AttributeLocalizedEnumValue template) factory method to create a deep copy of AttributeLocalizedEnumValue- Parameters:
template
- instance to be copied- Returns:
- copy instance
-
builder
builder factory method for AttributeLocalizedEnumValue- Returns:
- builder
-
builder
create builder for AttributeLocalizedEnumValue instance- Parameters:
template
- instance with prefilled values for the builder- Returns:
- builder
-
withAttributeLocalizedEnumValue
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
-