Class PrimitiveValueDecoders
- java.lang.Object
 - 
- com.daml.ledger.javaapi.data.codegen.PrimitiveValueDecoders
 
 
- 
public final class PrimitiveValueDecoders extends java.lang.ObjectValueDecoders for Daml types that are not code-generated.- See Also:
 ValueDecoder
 
- 
- 
Field Summary
Fields Modifier and Type Field Description static ValueDecoder<java.lang.Boolean>fromBoolstatic ValueDecoder<java.time.LocalDate>fromDatestatic ValueDecoder<java.lang.Long>fromInt64static ValueDecoder<java.math.BigDecimal>fromNumericstatic ValueDecoder<java.lang.String>fromPartystatic ValueDecoder<java.lang.String>fromTextstatic ValueDecoder<java.time.Instant>fromTimestampstatic ValueDecoder<Unit>fromUnit 
- 
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static <T> ValueDecoder<ContractId<T>>fromContractId(ValueDecoder<T> contractType)static <K,V>
ValueDecoder<java.util.Map<K,V>>fromGenMap(ValueDecoder<K> keyType, ValueDecoder<V> valueType)Specifically for decoding theDA.Internal.LF.Mapprimitive type.static <T> ValueDecoder<java.util.List<T>>fromList(ValueDecoder<T> element)static <T> ValueDecoder<java.util.Optional<T>>fromOptional(ValueDecoder<T> element)static <T> ValueDecoder<java.util.Map<java.lang.String,T>>fromTextMap(ValueDecoder<T> valueType)Specifically for decoding theDA.Internal.LF.TextMapprimitive type.static <T> ValueDecoder<T>impossible()Can be passed to decoder-producing functions to decode phantom type parameters only. 
 - 
 
- 
- 
Field Detail
- 
fromBool
public static final ValueDecoder<java.lang.Boolean> fromBool
 
- 
fromInt64
public static final ValueDecoder<java.lang.Long> fromInt64
 
- 
fromText
public static final ValueDecoder<java.lang.String> fromText
 
- 
fromTimestamp
public static final ValueDecoder<java.time.Instant> fromTimestamp
 
- 
fromParty
public static final ValueDecoder<java.lang.String> fromParty
 
- 
fromUnit
public static final ValueDecoder<Unit> fromUnit
 
- 
fromDate
public static final ValueDecoder<java.time.LocalDate> fromDate
 
- 
fromNumeric
public static final ValueDecoder<java.math.BigDecimal> fromNumeric
 
 - 
 
- 
Method Detail
- 
fromList
public static <T> ValueDecoder<java.util.List<T>> fromList(ValueDecoder<T> element)
 
- 
fromOptional
public static <T> ValueDecoder<java.util.Optional<T>> fromOptional(ValueDecoder<T> element)
 
- 
fromContractId
public static <T> ValueDecoder<ContractId<T>> fromContractId(ValueDecoder<T> contractType)
 
- 
fromTextMap
public static <T> ValueDecoder<java.util.Map<java.lang.String,T>> fromTextMap(ValueDecoder<T> valueType)
Specifically for decoding theDA.Internal.LF.TextMapprimitive type.// given a ValueDecoder<V> vdv // this decodes a TextMap Map<String, V> m1 = fromTextMap(vdv).decode(value); // this decodes a GenMap with a Text key type // which has an incompatible encoded format Map<String, V> m2 = fromGenMap(fromText, vdv).decode(value);
 
- 
fromGenMap
public static <K,V> ValueDecoder<java.util.Map<K,V>> fromGenMap(ValueDecoder<K> keyType, ValueDecoder<V> valueType)
Specifically for decoding theDA.Internal.LF.Mapprimitive type. 
- 
impossible
public static <T> ValueDecoder<T> impossible()
Can be passed to decoder-producing functions to decode phantom type parameters only. Such type parameters appear on the left of the=indatadeclarations, but are used for no actual data. This will fail at runtime if the type parameter isn't really phantom. 
 - 
 
 -