public Set < Region > getContainedRegions ( RegionType type ) { loadRegionData ( ) ; Set < Region > result = new TreeSet < Region > ( ) ; Set < Region > cr = getContainedRegions ( ) ; for ( Region r : cr ) { if ( r . getType ( ) == type ) { result . add ( r ) ; } else { result . addAll ( r . getContainedRegions ( type ) ) ; } } return Collections . unmodifiableSet ( result ) ; }
Used to determine all the regions that are contained within this region and that match the given type