Interface EnumValue
public interface EnumValue
EnumValue
Example to create an instance using the builder pattern
Example to create an instance using the builder pattern
EnumValue enumValue = EnumValue.builder()
.key("{key}")
.label("{label}")
.build()
-
Method Summary
Modifier and TypeMethodDescriptionstatic EnumValueBuilderbuilder()builder factory method for EnumValuestatic EnumValueBuildercreate builder for EnumValue instancecopyDeep()static EnumValuefactory method to create a deep copy of EnumValue@NotNull StringgetKey()Key of the value used as a programmatic identifier.@NotNull StringgetLabel()Descriptive label of the value.static EnumValueof()factory methodstatic EnumValuefactory method to create a shallow copy EnumValuevoidKey of the value used as a programmatic identifier.voidDescriptive label of the value.static com.fasterxml.jackson.core.type.TypeReference<EnumValue>gives a TypeReference for usage with Jackson DataBinddefault <T> TwithEnumValue(Function<EnumValue, T> helper) accessor map function
-
Method Details
-
getKey
Key of the value used as a programmatic identifier.
- Returns:
- key
-
getLabel
Descriptive label of the value.
- Returns:
- label
-
setKey
Key of the value used as a programmatic identifier.
- Parameters:
key- value to be set
-
setLabel
Descriptive label of the value.
- Parameters:
label- value to be set
-
of
factory method- Returns:
- instance of EnumValue
-
of
factory method to create a shallow copy EnumValue- Parameters:
template- instance to be copied- Returns:
- copy instance
-
copyDeep
EnumValue copyDeep() -
deepCopy
factory method to create a deep copy of EnumValue- Parameters:
template- instance to be copied- Returns:
- copy instance
-
builder
builder factory method for EnumValue- Returns:
- builder
-
builder
create builder for EnumValue instance- Parameters:
template- instance with prefilled values for the builder- Returns:
- builder
-
withEnumValue
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
-