public class RegionCollectionConsumer extends java.lang.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(java.util.Collection<ProtectedRegion> collection,
boolean addParents)
Create a new instance.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
apply(ProtectedRegion region) |
public RegionCollectionConsumer(java.util.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)