Skip to content

Instantly share code, notes, and snippets.

@amay077
Created August 1, 2012 13:53
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save amay077/3227037 to your computer and use it in GitHub Desktop.
Save amay077/3227037 to your computer and use it in GitHub Desktop.
reactive4java new sample
ObservableBuilder.range(1, 10) // 元のデータソース
.where(new Func1<Integer, Boolean>() { // 偶数だけを抽出
@Override
public Boolean invoke(Integer param1) {
return param1 % 2 == 0;
}
})
.select(new Func1<Integer, Integer>() { // 結果を3倍にする
@Override
public Integer invoke(Integer param1) {
return param1 * 3;
}
}).register(Reactive.println());
@amay077
Copy link
Author

amay077 commented Aug 22, 2012

Reactive4Java http://code.google.com/p/reactive4java/ 0.96 からメソッドがチェインできるようになってはぴはぴはっぴー

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment