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 Details

    • RegionCollectionConsumer

      public RegionCollectionConsumer(Collection<? super ProtectedRegion> collection, boolean addParents)
      Create a new instance.
      Parameters:
      collection - the collection to add regions to
      addParents - true to also add the parents to the collection
  • Method Details