0

When I trace legacy code, I found something very strange. I can get all the data values from LinkedHashSet, not from the other(FilterSet).

Although data can be seen in unfiltered, but in iteration, I cannot get the required data. Is it because of the predicate? How to get all the data from unfiltered ones?

I found that guava is used in the implementation of utilities class in my project.

What is the difference of these two sets? Any help is greatly appreciated.

enter image description here

Set<A<? extends B, ?>> attributes;
4

1 回答 1

1

Sets.filter返回一个名为的私有实现类型FilteredSet,它是另一个集合的视图,将其输出限制为仅具有某些特定属性的原始集合的元素。

故意没有办法取出未经过滤的原始数据。

于 2015-05-29T05:44:35.530 回答