xenoterracide
10/11/2019, 10:43 PMmyMethod Function { foo -> bar }
in kotlin to pass the function, in java that would just be myMethod( foo -> bar )
Evgeniy Zaharov
10/14/2019, 8:26 AMpublic class TestF {
public void test(Function<Integer, Integer> action, Integer value) {
action.apply(value);
}
}
and call in Kotlin:
val instance = TestF()
instance.test( { it * it }, 123)
Evgeniy Zaharov
10/14/2019, 8:27 AMval instance = TestF()
instance.test(123) { it * it }
xenoterracide
10/14/2019, 10:32 PMassertThat(dump).extracting(
Function { it.averageIap },
Function { it.averageRespitoryRate },
Function { it.averageTemperature },
Function { it.urineVolumeDelta },
Function { it.mrn },
Function { it.start },
Function { it.end }
).containsExactly(1.0, 2.0, 3.0, 4.0, "a", start, end)
xenoterracide
10/17/2019, 9:07 PMxenoterracide
10/17/2019, 9:10 PM.extracting(Function<FhirConfig, Any?> { it.endpoint }, Function<FhirConfig, Any?> { it.version })