
Guava
sunxboy
这个作者很懒,什么都没留下…
展开
-
google toString工具使用
@Override public String toString() { //@formatter:off return com.google.common.base.Objects.toStringHelper(this) .add("clientId", clientId...原创 2014-03-10 10:07:11 · 238 阅读 · 0 评论 -
Guava小功能收集
自定义过滤条件的集合 List<Integer> numbers = Lists.newArrayList(1, 2, 3, 6, 10, 34, 57, 89); Predicate<Integer> acceptEven = new Predicate<Integer>() { @Override public boolean ap...原创 2013-11-03 21:13:57 · 99 阅读 · 0 评论 -
guava 常用用法
根据 指定大小对 一个大的list拆分成固定size的较小 list Lists.partition(list, n) List<Foo> foos = ... for (List<Foo> partition : Lists.partition(foos, n)) { // do something with partition } ...原创 2018-07-13 08:54:15 · 699 阅读 · 0 评论