Code example for TreeMap

Methods: containsKey, remove

0
	public PersistentTile getTile(BlockIndex index) {
		return tiles.get(index);
	} 
 
	public void removeTile(BlockIndex index) {
		if (tiles.containsKey(index))
			tiles.remove(index).destroy ();
	} 
 
	public static PersistentWorld getWorld (IBlockAccess blockAccess) {
		Long hash = CoreProxy.getHash(blockAccess);
		if (!hash.equals(lastBlockAccess)) {
			if (!worlds.containsKey(hash))
				worlds.put(hash, new PersistentWorld());
 
			lastBlockAccess = hash;
			lastWorld = worlds.get(hash);
		} 
 
		return lastWorld;
	}