googleのライブラリ
guava-libraries
- http://code.google.com/p/guava-libraries/
- splitterとか便利そう。
Splitter.on(',') .trimResults() .omitEmptyStrings() .split(" foo, ,bar, quux,") --> ["foo", "bar", "quux"] int count = Files.readLines( new File("/path/to/file"), Charsets.UTF_8, // remember that? :) new LineProcessor<Integer>() { int count = 0; public boolean processLine(String line) { count++; } public Integer getResult() { return count; } });
google-collections
- http://code.google.com/p/google-collections/
- 割と有名だけど私は使ってない。使おうかしら。