class RxExamples {

public Observable<Artist> search(String searchedName,
                                 String searchedNationality,
                                 int maxResults) {

    return getSavedArtists()  // <1>
          .filter(name -> name.contains(searchedName)) // <2>
          .flatMap(this::lookupArtist) // <3>
          .filter(artist -> artist.getNationality() // <4>
                                  .contains(searchedNationality))
          .take(maxResults); // <5>
}

public  RxExamples(List<Artist> savedArtists);

}