RxWindowIfChanged
An RxJava 2 operator which splits an observable into windows using a key selector.
Install / Use
/learn @JakeWharton/RxWindowIfChangedREADME
RxJava Window If Changed
The WindowIfChanged operator for RxJava 2 divides an Observable that emits items into an
Observable that emits Observables, each one of which emits some subset of the items from the
original source. The items in each inner Observable all have a common "key" based on a key
selector function. A new inner Observable is emitted and the previous inner Observable
completes each time the key changes from the previous item.

Observable<Actions> actions = //...
Observable<GroupedObservable<String, Action>> targetedActions =
WindowIfChanged.create(actions, action -> action.target);
Download
Gradle:
implementation("com.jakewharton.rx:window-if-changed:1.0.0")
Maven:
<dependency>
<groupId>com.jakewharton.rx</groupId>
<artifactId>window-if-changed</artifactId>
<version>1.0.0</version>
</dependency>
If you use Kotlin, a package with an extension method for Observable is provided. Replace the
window-if-changed artifact ID above with window-if-changed-kotlin.
Snapshots of the development version are available in Sonatype's snapshots repository.
License
Copyright 2016 Jake Wharton
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
Related Skills
node-connect
348.5kDiagnose OpenClaw node connection and pairing failures for Android, iOS, and macOS companion apps
frontend-design
109.1kCreate distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.
openai-whisper-api
348.5kTranscribe audio via OpenAI Audio Transcriptions API (Whisper).
qqbot-media
348.5kQQBot 富媒体收发能力。使用 <qqmedia> 标签,系统根据文件扩展名自动识别类型(图片/语音/视频/文件)。
