Interface Attributes
public interface Attributes
Attributes
Example to create an instance using the builder pattern
Example to create an instance using the builder pattern
Attributes attributes = Attributes.builder()
.build()
-
Method Summary
Modifier and TypeMethodDescriptionstatic AttributesBuilder
builder()
builder factory method for Attributesstatic AttributesBuilder
builder
(Attributes template) create builder for Attributes instancestatic Attributes
deepCopy
(Attributes template) factory method to create a deep copy of Attributesstatic Attributes
of()
factory methodstatic Attributes
of
(Attributes template) factory method to create a shallow copy Attributesvoid
The name of the attribute is given by the key and shouldn't be set on the attribute itself.static com.fasterxml.jackson.core.type.TypeReference<Attributes>
gives a TypeReference for usage with Jackson DataBindvalues()
The name of the attribute is given by the key and shouldn't be set on the attribute itself.default <T> T
withAttributes
(Function<Attributes, T> helper) accessor map function
-
Method Details
-
values
The name of the attribute is given by the key and shouldn't be set on the attribute itself. And since this property will be represented as a map, we can set individual attributes to null to delete them (which follows JSON Merge Patch semantics).
- Returns:
- map of the pattern property values
-
setValue
The name of the attribute is given by the key and shouldn't be set on the attribute itself. And since this property will be represented as a map, we can set individual attributes to null to delete them (which follows JSON Merge Patch semantics).
- Parameters:
key
- property namevalue
- property value
-
of
factory method- Returns:
- instance of Attributes
-
of
factory method to create a shallow copy Attributes- Parameters:
template
- instance to be copied- Returns:
- copy instance
-
deepCopy
factory method to create a deep copy of Attributes- Parameters:
template
- instance to be copied- Returns:
- copy instance
-
builder
builder factory method for Attributes- Returns:
- builder
-
builder
create builder for Attributes instance- Parameters:
template
- instance with prefilled values for the builder- Returns:
- builder
-
withAttributes
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
-