@@ -75,6 +75,7 @@ private Watch(Path path, WatchScope scope) {
7575 * @param path which absolute path to monitor, can be a file or a directory, but has to be absolute
7676 * @param scope for directories you can also choose to monitor it's direct children or all it's descendants
7777 * @throws IllegalArgumentException in case a path is not supported (in relation to the scope)
78+ * @return watch builder that can be further configured and then started
7879 */
7980 public static Watch build (Path path , WatchScope scope ) {
8081 if (!path .isAbsolute ()) {
@@ -103,7 +104,7 @@ public static Watch build(Path path, WatchScope scope) {
103104 * Use the {@link #withExecutor(Executor)} function to influence the sequencing of these events.
104105 * By default they can arrive in parallel.
105106 * @param eventHandler a callback that handles the watch event, will be called once per event.
106- * @return this for optional method chaining
107+ * @return {@code this} (to support method chaining)
107108 */
108109 public Watch on (Consumer <WatchEvent > eventHandler ) {
109110 if (this .eventHandler != EMPTY_HANDLER ) {
@@ -115,6 +116,8 @@ public Watch on(Consumer<WatchEvent> eventHandler) {
115116
116117 /**
117118 * Convenience variant of {@link #on(Consumer)}, which allows you to only respond to certain events
119+ * @param listener gets executed on every event the watch produced
120+ * @return {@code this} (to support method chaining)
118121 */
119122 public Watch on (WatchEventListener listener ) {
120123 if (this .eventHandler != EMPTY_HANDLER ) {
0 commit comments