しかだよ。Guavaってライブラリが良いってインターネットに書いてたので調べてみたよ。 サンプルソースのほとんどは本家からコピペしたよ。 guava-libraries - Guava: Google Core Libraries for Java 1.6+ - Google Project Hosting Basic Using/avoiding null nullぽを避けるための仕組み {% highlight java %} Optional possible = Optional.of(5); possible.isPresent(); // returns true possible.get(); // returns 5 Preconditions 引数の値チェックなど、前提条件をチェックする仕組み。assertとかに似てると思う。 条件がfalseだと対応するExceptio
![Google製Javaライブラリ Guavaを使ってみた。](https://cdn-ak-scissors.b.st-hatena.com/image/square/8be5b16378fb319c701e8844d4d8f7fdc0ec1adb/height=288;version=1;width=512/https%3A%2F%2Fshikajiro.github.io%2Fimages%2Fprofile.jpg)