commercetools-jvm-sdk
commercetools-jvm-sdk copied to clipboard
AttributeDraftImpl getValue with type using AttributeAcess
In the AttributeImpl
there is the method getValue
that takes AttributeAccess<T>
access to return you a value of type T.
For example, it can be used to return a value of LocalizedString
by passing the AttributeAccess.ofLocalizedString()
. However, in AttributeDraftImpl
, getValue
only returns JsonNode
, so you cannot get the value with it's actual type and have to do manual parsing instead. Why does AttributeDraft
not have, like AttributeImpl, a getValue
method that takes AttributeAccess<T>
access to return you a value of type T
?