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
Options for constructing a region set via
RegionQuery.getApplicableRegions(Location, QueryOption)
for example.-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionConstructs a region set that includes parent regions and is sorted byNormativeOrders
.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).Constructs a region set that does not include parent regions and is sorted byNormativeOrders
. -
Method Summary
Modifier and TypeMethodDescriptionconstructResult
(Set<ProtectedRegion> applicable) Convert the set of regions to a list.createIndexConsumer
(Collection<? super ProtectedRegion> collection) Create aRegionCollectionConsumer
with the given collection used for theRegionIndex
.static RegionQuery.QueryOption
Returns the enum constant of this class with the specified name.static RegionQuery.QueryOption[]
values()
Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
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
Constructs a region set that does not include parent regions and is sorted byNormativeOrders
. -
COMPUTE_PARENTS
Constructs a region set that includes parent regions and is sorted byNormativeOrders
.
-
-
Method Details
-
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
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 nameNullPointerException
- if the argument is null
-
createIndexConsumer
Create aRegionCollectionConsumer
with the given collection used for theRegionIndex
. Internal API.- Parameters:
collection
- the collection- Returns:
- a region collection consumer
-
constructResult
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
-