mirror of
https://github.com/EngineHub/WorldGuard.git
synced 2024-11-16 23:55:23 +01:00
RegionIndex now extends Iterable<Region>.
This commit is contained in:
parent
6fa7faad12
commit
fe2e399451
@ -107,4 +107,9 @@ public synchronized int size() {
|
|||||||
public void reindex() {
|
public void reindex() {
|
||||||
// Whoo, nothing to do, because this index is so simple
|
// Whoo, nothing to do, because this index is so simple
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Iterator<Region> iterator() {
|
||||||
|
return regions.values().iterator();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -132,4 +132,9 @@ public void reindex() {
|
|||||||
tree.load(regions.values());
|
tree.load(regions.values());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Iterator<Region> iterator() {
|
||||||
|
return regions.values().iterator();
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
@ -38,7 +38,7 @@
|
|||||||
* querying by ID. Any casing can be used when looking up an ID. Implementations do NOT
|
* querying by ID. Any casing can be used when looking up an ID. Implementations do NOT
|
||||||
* have to be thread-safe.
|
* have to be thread-safe.
|
||||||
*/
|
*/
|
||||||
public interface RegionIndex {
|
public interface RegionIndex extends Iterable<Region> {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Queries the index for a list of {@link Region}s that contain the
|
* Queries the index for a list of {@link Region}s that contain the
|
||||||
|
Loading…
Reference in New Issue
Block a user