base/common/src/main/com/thesett/common/util/doublemaps/HashMapXY.java
public E remove(Long x, Long y)
    {
        // Extract the region containing the coordinates from the hash table
        Bucket<E> region = (Bucket<E>) regions.get(new Coordinates(div(x, bucketSize), div(y, bucketSize)));

        // Check if the whole region is empty
        if (region == null)
        {
            // Return null as nothing to remove
            return null;
        }

        // Get the coordinates within the region
        E removed = (region.array[mod(x, bucketSize)][mod(y, bucketSize)]);

        // Clear the coordinate within the region
        region.array[mod(x, bucketSize)][mod(y, bucketSize)] = null;

        // Decrement the bucket and whole data strucutre item counts to reflect the true size
        size--;
        region.itemCount--;

        // Return the removed data item
        return removed;
    }
public E remove(Long x, Long y)
    {
        // Extract the region containing the coordinates from the hash table
        Bucket<E> region = (Bucket<E>) regions.get(new Coordinates(div(x, bucketSize), div(y, bucketSize)));

        // Check if the whole region is empty
        if (region == null)
        {
            // Return null as nothing to remove
            return null;
        }

        // Get the coordinates within the region
        E removed = (region.array[mod(x, bucketSize)][mod(y, bucketSize)]);

        // Clear the coordinate within the region
        region.array[mod(x, bucketSize)][mod(y, bucketSize)] = null;

        // Decrement the bucket and whole data strucutre item counts to reflect the true size
        size--;
        region.itemCount--;

        // Return the removed data item
        return removed;
    }
Removes the mapping for this coordinate from this map if present (optional operation).

@param  x The x coordinate.
@param  y The y coordinate.

@return Previous value associated with specified coordinate, or <tt>null</tt> if there was no mapping for
coordinate.