diff --git a/reactfx/src/main/java/org/reactfx/EventStream.java b/reactfx/src/main/java/org/reactfx/EventStream.java index de6effa..7be5daf 100644 --- a/reactfx/src/main/java/org/reactfx/EventStream.java +++ b/reactfx/src/main/java/org/reactfx/EventStream.java @@ -101,6 +101,14 @@ default EventStream distinct() { return new DistinctStream<>(this); } + /** + * Returns an event stream that emits the given constant value every time + * this stream emits a value. + */ + default EventStream supply(U value) { + return map(x -> value); + } + /** * Returns an event stream that emits a value obtained from the given * supplier every time this event stream emits a value.