public static class ToDafny.Aggregate
extends java.lang.Object
| Constructor and Description |
|---|
Aggregate() |
| Modifier and Type | Method and Description |
|---|---|
static <IN_KEY,IN_VALUE,OUT_KEY,OUT_VALUE> |
GenericToMap(java.util.Map<IN_KEY,IN_VALUE> nativeValues,
java.util.function.Function<IN_KEY,OUT_KEY> keyConverter,
java.util.function.Function<IN_VALUE,OUT_VALUE> valueConverter) |
static <T,R> dafny.DafnySequence<? extends R> |
GenericToSequence(java.util.List<T> nativeValues,
java.util.function.Function<T,R> converter,
dafny.TypeDescriptor<R> typeDescriptor) |
static <T,R> dafny.DafnySet<R> |
GenericToSet(java.util.Set<T> nativeValues,
java.util.function.Function<T,R> converter)
Note: Sets in Java and in Dafny DO NOT preserve order; Smithy discourages un-ordered Sets.
|
public static <T,R> dafny.DafnySequence<? extends R> GenericToSequence(java.util.List<T> nativeValues,
java.util.function.Function<T,R> converter,
dafny.TypeDescriptor<R> typeDescriptor)
T - The natural Java Type.R - The Dafny Runtime Type.nativeValues - The Java type for a list can be List.converter - A Function that converts from a natural Java Type to a Dafny Runtime Type.typeDescriptor - A TypeDescriptor that describes the Dafny Runtime Type.DafnySequence of <R>,
which is the result of applying converter to
every member of nativeValues.ToNative.Aggregate.GenericToList(DafnySequence, Function)public static <T,R> dafny.DafnySet<R> GenericToSet(java.util.Set<T> nativeValues,
java.util.function.Function<T,R> converter)
T - The natural Java Type.R - The Dafny Runtime Type.nativeValues - The Java type for a set can be Set.converter - A Function that converts from a natural Java Type to a Dafny Runtime Type.DafnySet of <R>,
which is the result of applying converter to
every member of nativeValues.ToNative.Aggregate.GenericToSet(DafnySet, Function)public static <IN_KEY,IN_VALUE,OUT_KEY,OUT_VALUE> dafny.DafnyMap<OUT_KEY,OUT_VALUE> GenericToMap(java.util.Map<IN_KEY,IN_VALUE> nativeValues,
java.util.function.Function<IN_KEY,OUT_KEY> keyConverter,
java.util.function.Function<IN_VALUE,OUT_VALUE> valueConverter)
IN_KEY - The natural Java Type for the KeyIN_VALUE - The natural Java Type for the ValueOUT_KEY - The Dafny Runtime Type for the Key.OUT_VALUE - The Dafny Runtime Type for the Value.nativeValues - The Java type for a map can be Map.keyConverter - A Function that converts natural Java Type for the Key to a Dafny Runtime Type.valueConverter - A Function that converts natural Java Type for the Value to a Dafny Runtime Type.DafnyMap of <OUT_KEY, OUT_VALUE>,
which is the result of applying keyConverter and valueConverter to
every member of nativeValues.ToNative.Aggregate.GenericToMap(DafnyMap, Function, Function)