use of com.annimon.stream.function.DoubleSupplier in project Lightweight-Stream-API by aNNiMON.
the class GenerateTest method testStreamGenerate.
@Test
public void testStreamGenerate() {
DoubleStream stream = DoubleStream.generate(new DoubleSupplier() {
@Override
public double getAsDouble() {
return 1.234;
}
});
assertThat(stream.limit(3), elements(arrayContaining(1.234, 1.234, 1.234)));
}
Aggregations