Class EncodedValues
java.lang.Object
io.temporal.common.converter.EncodedValues
-
Constructor Summary
ConstructorsConstructorDescriptionEncodedValues(Object... values) EncodedValues(Optional<io.temporal.api.common.v1.Payloads> payloads, DataConverter converter) -
Method Summary
Modifier and TypeMethodDescription<T> TGet value of the specified type.<T> TGet value of the specified generic type.intgetSize()voidsetDataConverter(DataConverter converter) Optional<io.temporal.api.common.v1.Payloads>
-
Constructor Details
-
EncodedValues
public EncodedValues(Optional<io.temporal.api.common.v1.Payloads> payloads, DataConverter converter) -
EncodedValues
-
-
Method Details
-
toPayloads
-
setDataConverter
-
getSize
-
get
Description copied from interface:ValuesGet value of the specified type.- Specified by:
getin interfaceValues- Type Parameters:
T- type of the value to get- Parameters:
index- index of the value in the list of values.parameterType- class of the value to get- Returns:
- value or null
- Throws:
DataConverterException- if value cannot be extracted to the given type
-
get
public <T> T get(int index, Class<T> parameterType, Type genericParameterType) throws DataConverterException Description copied from interface:ValuesGet value of the specified generic type. For example if value is of type Listuse the following expression (using TypeToken) to extract:TypeToken<List<MyClass>> typeToken = new TypeToken<List<MyClass>>() {}; List<MyClass> result = value.get(List.class, typeToken.getType());- Specified by:
getin interfaceValues- Type Parameters:
T- type of the value to get- Parameters:
index- index of the value in the list of values.parameterType- class of the value to getgenericParameterType- the type of the value to get- Returns:
- value or null
- Throws:
DataConverterException- if value cannot be extracted to the given type
-