public class RegionCollectionConsumer extends Object implements com.google.common.base.Predicate<ProtectedRegion>
This class can also add the parents of regions that are visited to the collection, although it may result in duplicates in the collection if the collection is not a set.
| Constructor and Description |
|---|
RegionCollectionConsumer(Collection<ProtectedRegion> collection,
boolean addParents)
Create a new instance.
|
public RegionCollectionConsumer(Collection<ProtectedRegion> collection, boolean addParents)
collection - the collection to add regions toaddParents - true to also add the parents to the collectionpublic boolean apply(ProtectedRegion region)
apply in interface com.google.common.base.Predicate<ProtectedRegion>Copyright © 2015. All Rights Reserved.