Interface NumberAttribute
- All Superinterfaces:
Attribute
This type represents an attribute whose value is a number.
Example to create an instance using the builder pattern
NumberAttribute numberAttribute = NumberAttribute.builder()
.value(0.3)
.build()
-
Field Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic NumberAttributeBuilder
builder()
builder factory method for NumberAttributestatic NumberAttributeBuilder
builder
(NumberAttribute template) create builder for NumberAttribute instancestatic NumberAttribute
deepCopy
(NumberAttribute template) factory method to create a deep copy of NumberAttribute@NotNull Double
getValue()
static NumberAttribute
of()
factory methodstatic NumberAttribute
of
(NumberAttribute template) factory method to create a shallow copy NumberAttributevoid
set valuestatic com.fasterxml.jackson.core.type.TypeReference<NumberAttribute>
gives a TypeReference for usage with Jackson DataBinddefault <T> T
withNumberAttribute
(Function<NumberAttribute, T> helper) accessor map functionMethods inherited from interface com.commercetools.importapi.models.productvariants.Attribute
getName, getType, setName, withAttribute
-
Field Details
-
NUMBER
discriminator value for NumberAttribute- See Also:
-
-
Method Details
-
getValue
- Returns:
- value
-
setValue
set value- Parameters:
value
- value to be set
-
of
factory method- Returns:
- instance of NumberAttribute
-
of
factory method to create a shallow copy NumberAttribute- Parameters:
template
- instance to be copied- Returns:
- copy instance
-
deepCopy
factory method to create a deep copy of NumberAttribute- Parameters:
template
- instance to be copied- Returns:
- copy instance
-
builder
builder factory method for NumberAttribute- Returns:
- builder
-
builder
create builder for NumberAttribute instance- Parameters:
template
- instance with prefilled values for the builder- Returns:
- builder
-
withNumberAttribute
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
-