Now that we have found ways to select data, let's look at ways to reject data. The Reactor API offers diverse methods to reject data. There is a skip operator, with the following types:
- Skip(count): This will reject the specified number of elements from the beginning of the stream.
- Skip(Duration): This will reject elements for the said duration from the beginning of the stream.
- SkipLast(count): This will reject a specified number of elements from the end of the stream.
- SkipUntil(Boolean Predicate): This will reject elements until the first occurrence of the said condition is true.
The preceding commands are shown in the following code:
fibonacciGenerator.skip(10).subscribe(t -> { System.out.println(t); }); fibonacciGenerator.skip(Duration.ofMillis( ...