Code example for Hashtable

Methods: keySet

0
	public int getY() { 
		return pos.y;
	} 
	 
	static public int getLoadedTiles() { 
		return instances.keySet().size();
	} 
 
	static public void reduceTiles(ArrayList<Image> tiles) {
		Enumeration<Integer> tmp = instances.keys();
		while (tmp.hasMoreElements()) {
			int key = tmp.nextElement();
			Image obj = instances.get(key);
			if (!tiles.contains(obj)) {
				instances.remove(key);
			} 
		} 
	} 
}