2021
05-02
05-02
java的Guava工具包介绍
集合普通集合List<String>list=Lists.newArrayList();Set<String>set=Sets.newHashSet();Map<String,String>map=Maps.newHashMap();Set取交集、并集、差集HashSet<Integer>setA=Sets.newHashSet(1,2,3,4,5);HashSet<Integer>setB=Sets.newHashSet(4,5,6,7,8);Sets.SetView<Integer>union=Sets.union(setA,setB);System.out.println("union:"+union);Sets.SetView<Integer>difference=Sets.diffe...
继续阅读 >