@Test public void expandToInclude() { RectangleLong rect = new RectangleLong(); assertTrue(rect.isNull()); rect.expandToInclude(new MBTilesTileLocation(0, 10, 20)); assertEquals(new RectangleLong(10, 10, 20, 20), rect); assertFalse(rect.isNull()); }
public void expandToInclude(MBTilesTileLocation loc) { if (isNull()) { minX = maxX = loc.getTileColumn(); minY = maxY = loc.getTileRow(); } else { long x = loc.getTileColumn(); long y = loc.getTileRow(); if (x < minX) { minX = x; } else if (x > maxX) { maxX = x; } if (y < minY) { minY = y; } else if (y > maxY) { maxY = y; } } }
RectangleLong { public void expandToInclude(MBTilesTileLocation loc) { if (isNull()) { minX = maxX = loc.getTileColumn(); minY = maxY = loc.getTileRow(); } else { long x = loc.getTileColumn(); long y = loc.getTileRow(); if (x < minX) { minX = x; } else if (x > maxX) { maxX = x; } if (y < minY) { minY = y; } else if (y > maxY) { maxY = y; } } } }
RectangleLong { public void expandToInclude(MBTilesTileLocation loc) { if (isNull()) { minX = maxX = loc.getTileColumn(); minY = maxY = loc.getTileRow(); } else { long x = loc.getTileColumn(); long y = loc.getTileRow(); if (x < minX) { minX = x; } else if (x > maxX) { maxX = x; } if (y < minY) { minY = y; } else if (y > maxY) { maxY = y; } } } RectangleLong(long minX, long maxX, long minY, long maxY);  RectangleLong(); }
RectangleLong { public void expandToInclude(MBTilesTileLocation loc) { if (isNull()) { minX = maxX = loc.getTileColumn(); minY = maxY = loc.getTileRow(); } else { long x = loc.getTileColumn(); long y = loc.getTileRow(); if (x < minX) { minX = x; } else if (x > maxX) { maxX = x; } if (y < minY) { minY = y; } else if (y > maxY) { maxY = y; } } } RectangleLong(long minX, long maxX, long minY, long maxY);  RectangleLong(); void setToNull(); long getMinX(); void setMinX(long minX); long getMaxX(); void setMaxX(long maxX); long getMinY(); void setMinY(long minY); long getMaxY(); void setMaxY(long maxY); @Override String toString(); @Override boolean equals(Object o); @Override int hashCode(); void expandToInclude(MBTilesTileLocation loc); void expandToInclude(RectangleLong other); RectangleLong intersection(RectangleLong other); boolean intersects(RectangleLong other); boolean isNull(); void forEach(PositionConsumer consumer); }
RectangleLong { public void expandToInclude(MBTilesTileLocation loc) { if (isNull()) { minX = maxX = loc.getTileColumn(); minY = maxY = loc.getTileRow(); } else { long x = loc.getTileColumn(); long y = loc.getTileRow(); if (x < minX) { minX = x; } else if (x > maxX) { maxX = x; } if (y < minY) { minY = y; } else if (y > maxY) { maxY = y; } } } RectangleLong(long minX, long maxX, long minY, long maxY);  RectangleLong(); void setToNull(); long getMinX(); void setMinX(long minX); long getMaxX(); void setMaxX(long maxX); long getMinY(); void setMinY(long minY); long getMaxY(); void setMaxY(long maxY); @Override String toString(); @Override boolean equals(Object o); @Override int hashCode(); void expandToInclude(MBTilesTileLocation loc); void expandToInclude(RectangleLong other); RectangleLong intersection(RectangleLong other); boolean intersects(RectangleLong other); boolean isNull(); void forEach(PositionConsumer consumer);  }