Code example for Set

Methods: isEmpty, remove

0
 
    public boolean remove(long z, SpatialObject spatialObject) 
    { 
        boolean removed = false; 
        Set<SpatialObject> spatialObjects = map.get(z); 
        if (spatialObjects != null && spatialObjects.remove(spatialObject)) { 
            removed = true; 
            if (spatialObjects.isEmpty()) { 
                map.remove(z); 
            } 
        } 
        return removed; 
    } 
 
    public Scan scan(long z) 
    { 
        return new TreeIndexScan(space, z, map.tailMap(z).entrySet().iterator()); 
    } 
 
    // TreeIndex interface