code: public boolean isWithinBoundingBox(int x, int y, int zoom) {
          boolean withinBounds = true;
  
          // If a bounding box is set, check if it overlaps with the request
          if (webMercatorBoundingBox != null) {
  
              // Get the bounding box of the requested tile
              BoundingBox tileWebMercatorBoundingBox = TileBoundingBoxUtils
                      .getWebMercatorBoundingBox(x, y, zoom);
  
              // Adjust the bounding box if needed
              BoundingBox adjustedWebMercatorBoundingBox = getWebMercatorBoundingBox(tileWebMercatorBoundingBox);
  
              // Check if the request overlaps
              withinBounds = adjustedWebMercatorBoundingBox.intersects(
                      tileWebMercatorBoundingBox, true);
          }
  
          return withinBounds;
      }
docs: Check if the tile request is within the desired tile bounds
  
  @param x    x coordinate
  @param y    y coordinate
  @param zoom zoom value
  @return true if within bounds