/** * Returns a list of sub-regions which compose the current region. * @param subRegionSize The default sub-region size to use. * @param isFixedSize If {@code false}, then sub-regions might have a * size which is smaller then {@code subRegionSize} * (thus there will be no overlap of regions). * Otherwise, all sub-regions will have the same * size, but sub-regions might overlap. * @return The sub-regions composing the current region. If {@code * subRegionSize} is equal or greater than the current region, * only a single region is returned. */ public Iterable<Region> getSubRegions(RectangleSize subRegionSize, boolean isFixedSize) { if (isFixedSize) { return getSubRegionsWithFixedSize(this, subRegionSize); } return getSubRegionsWithVaryingSize(this, subRegionSize); }
/** * Returns a list of sub-regions which compose the current region. * @param subRegionSize The default sub-region size to use. * @param isFixedSize If {@code false}, then sub-regions might have a * size which is smaller then {@code subRegionSize} * (thus there will be no overlap of regions). * Otherwise, all sub-regions will have the same * size, but sub-regions might overlap. * @return The sub-regions composing the current region. If {@code * subRegionSize} is equal or greater than the current region, * only a single region is returned. */ public Iterable<Region> getSubRegions(RectangleSize subRegionSize, boolean isFixedSize) { if (isFixedSize) { return getSubRegionsWithFixedSize(this, subRegionSize); } return getSubRegionsWithVaryingSize(this, subRegionSize); }
/** * Returns a list of sub-regions which compose the current region. * @param subRegionSize The default sub-region size to use. * @param isFixedSize If {@code false}, then sub-regions might have a * size which is smaller then {@code subRegionSize} * (thus there will be no overlap of regions). * Otherwise, all sub-regions will have the same * size, but sub-regions might overlap. * @return The sub-regions composing the current region. If {@code * subRegionSize} is equal or greater than the current region, * only a single region is returned. */ public Iterable<Region> getSubRegions(RectangleSize subRegionSize, boolean isFixedSize) { if (isFixedSize) { return getSubRegionsWithFixedSize(this, subRegionSize); } return getSubRegionsWithVaryingSize(this, subRegionSize); }