Class RegionCollectionConsumer
java.lang.Object
com.sk89q.worldguard.protection.util.RegionCollectionConsumer
- All Implemented Interfaces:
com.google.common.base.Predicate<ProtectedRegion>
,Predicate<ProtectedRegion>
public class RegionCollectionConsumer
extends Object
implements com.google.common.base.Predicate<ProtectedRegion>
A consumer predicate that adds regions to a collection.
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 Summary
ConstructorsConstructorDescriptionRegionCollectionConsumer
(Collection<? super ProtectedRegion> collection, boolean addParents) Create a new instance. -
Method Summary
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface com.google.common.base.Predicate
equals, test
-
Constructor Details
-
RegionCollectionConsumer
Create a new instance.- Parameters:
collection
- the collection to add regions toaddParents
- true to also add the parents to the collection
-
-
Method Details
-
apply
- Specified by:
apply
in interfacecom.google.common.base.Predicate<ProtectedRegion>
-