Enum Class RegionQuery.QueryOption

java.lang.Object
java.lang.Enum<RegionQuery.QueryOption>
com.sk89q.worldguard.protection.regions.RegionQuery.QueryOption
All Implemented Interfaces:
Serializable, Comparable<RegionQuery.QueryOption>, Constable
Enclosing class:
RegionQuery

public static enum RegionQuery.QueryOption extends Enum<RegionQuery.QueryOption>
Options for constructing a region set via RegionQuery.getApplicableRegions(Location, QueryOption) for example.
  • Enum Constant Details

    • NONE

      public static final RegionQuery.QueryOption NONE
      Constructs a region set that does not include parent regions and may be left unsorted (but a cached, sorted set of the same regions may be returned).
    • SORT

      public static final RegionQuery.QueryOption SORT
      Constructs a region set that does not include parent regions and is sorted by NormativeOrders.
    • COMPUTE_PARENTS

      public static final RegionQuery.QueryOption COMPUTE_PARENTS
      Constructs a region set that includes parent regions and is sorted by NormativeOrders.
  • Method Details

    • values

      public static RegionQuery.QueryOption[] values()
      Returns an array containing the constants of this enum class, in the order they are declared.
      Returns:
      an array containing the constants of this enum class, in the order they are declared
    • valueOf

      public static RegionQuery.QueryOption valueOf(String name)
      Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum class has no constant with the specified name
      NullPointerException - if the argument is null
    • createIndexConsumer

      public RegionCollectionConsumer createIndexConsumer(Collection<? super ProtectedRegion> collection)
      Create a RegionCollectionConsumer with the given collection used for the RegionIndex. Internal API.
      Parameters:
      collection - the collection
      Returns:
      a region collection consumer
    • constructResult

      public List<ProtectedRegion> constructResult(Set<ProtectedRegion> applicable)
      Convert the set of regions to a list. Sort and add parents if necessary. Internal API.
      Parameters:
      applicable - the set of regions
      Returns:
      a list of regions