/** * same as {@link SwitchCase} but it emits only one item which is the result of the * {@link Function} mapped to the key matching the first emitted value *
* sample code : *
* {@code List
* {@code Observable.fromIterable(list)}
* // result :
* {@code Map
* {@code caseBlocks.put(2, (i) -> "TWO SELECTED");}
* {@code caseBlocks.put(3, (i) -> "THREE SELECTED");}
*
* {@code .lift(new SwitchCaseBreak<>(caseBlocks))}
* {@code .subscribe(System.out::println);}
*
* TWO SELECTED
*/
public class SwitchCaseBreak