Key - the group key typeU - the output element typeT - the source element typepublic class GroupBy<Key,U,T> extends java.lang.Object implements Observable<GroupedObservable<Key,U>>
Exception semantics: if the source sends an exception, the group observable and the individual groups' observables receive this error.
| Modifier and Type | Field and Description |
|---|---|
protected Func2<? super Key,? super Key,java.lang.Boolean> |
keyComparer |
| Constructor and Description |
|---|
GroupBy(Observable<? extends T> source,
Func1<? super T,? extends Key> keyExtractor,
Func2<? super Key,? super Key,java.lang.Boolean> keyComparer,
Func1<? super T,? extends U> valueExtractor)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
java.io.Closeable |
register(Observer<? super GroupedObservable<Key,U>> observer)
Registers an observer for the notification of Ts.
|
public GroupBy(Observable<? extends T> source, Func1<? super T,? extends Key> keyExtractor, Func2<? super Key,? super Key,java.lang.Boolean> keyComparer, Func1<? super T,? extends U> valueExtractor)
source - the source sequencekeyExtractor - the key extractorkeyComparer - the key comparatorvalueExtractor - the value extractor@Nonnull
public java.io.Closeable register(@Nonnull
Observer<? super GroupedObservable<Key,U>> observer)
Observableregister in interface Observable<GroupedObservable<Key,U>>observer - the observer of Ts or any supertype of it