Interface AttributeSetType
- All Superinterfaces:
AttributeType
AttributeType that defines a set (without duplicate elements) with values of the given elementType
. It does not support isRequired
. Since this type itself is an AttributeType, it is possible to construct an AttributeSetType of an AttributeSetType of any AttributeType, and to continue with this iteration until terminating with any non-AttributeSetType. In case the AttributeSetType iteration terminates with an AttributeNestedType, the iteration can have 5 steps at maximum.
Example to create an instance using the builder pattern
AttributeSetType attributeSetType = AttributeSetType.builder()
.elementType(elementTypeBuilder -> elementTypeBuilder)
.build()
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionstatic AttributeSetTypeBuilder
builder()
builder factory method for AttributeSetTypestatic AttributeSetTypeBuilder
builder
(AttributeSetType template) create builder for AttributeSetType instancestatic AttributeSetType
deepCopy
(AttributeSetType template) factory method to create a deep copy of AttributeSetType@NotNull @Valid AttributeType
Attribute type of the elements in the set.static AttributeSetType
of()
factory methodstatic AttributeSetType
of
(AttributeSetType template) factory method to create a shallow copy AttributeSetTypevoid
setElementType
(AttributeType elementType) Attribute type of the elements in the set.static com.fasterxml.jackson.core.type.TypeReference<AttributeSetType>
gives a TypeReference for usage with Jackson DataBinddefault <T> T
withAttributeSetType
(Function<AttributeSetType, T> helper) accessor map functionMethods inherited from interface com.commercetools.api.models.product_type.AttributeType
getName, withAttributeType
-
Field Details
-
SET
discriminator value for AttributeSetType- See Also:
-
-
Method Details
-
getElementType
Attribute type of the elements in the set.
- Returns:
- elementType
-
setElementType
Attribute type of the elements in the set.
- Parameters:
elementType
- value to be set
-
of
factory method- Returns:
- instance of AttributeSetType
-
of
factory method to create a shallow copy AttributeSetType- Parameters:
template
- instance to be copied- Returns:
- copy instance
-
deepCopy
factory method to create a deep copy of AttributeSetType- Parameters:
template
- instance to be copied- Returns:
- copy instance
-
builder
builder factory method for AttributeSetType- Returns:
- builder
-
builder
create builder for AttributeSetType instance- Parameters:
template
- instance with prefilled values for the builder- Returns:
- builder
-
withAttributeSetType
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
-