org.jagatoo.loaders.textures.cache
Class HashTextureCache

java.lang.Object
  extended by org.jagatoo.loaders.textures.cache.TextureCache
      extended by org.jagatoo.loaders.textures.cache.HashTextureCache

public class HashTextureCache
extends TextureCache

This TextureCache is implemented with a simple HashMap.


Constructor Summary
HashTextureCache()
           
 
Method Summary
 void addImpl(java.lang.String key, AbstractTexture texture)
          Removes the Texture from the cache.
 void clear()
          Clears the Texture-cache.
 AbstractTexture get(java.lang.String key)
          
 java.util.Collection<AbstractTexture> getCachedTextures()
          
 void removeImpl(AbstractTexture texture)
          Removes the Texture from the cache.
 
Methods inherited from class org.jagatoo.loaders.textures.cache.TextureCache
add, getCachedKeys, isEnabled, popEnabled, pushEnabled, remove, setEnabled
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

HashTextureCache

public HashTextureCache()
Method Detail

addImpl

public void addImpl(java.lang.String key,
                    AbstractTexture texture)
Removes the Texture from the cache.

Specified by:
addImpl in class TextureCache
Parameters:
key - the cache-key of the Texture to be removed.

removeImpl

public void removeImpl(AbstractTexture texture)
Removes the Texture from the cache.

Specified by:
removeImpl in class TextureCache
Parameters:
texture - the Texture to be removed

get

public AbstractTexture get(java.lang.String key)

Specified by:
get in class TextureCache
Returns:
the Texture cached under the given key or null.

getCachedTextures

public java.util.Collection<AbstractTexture> getCachedTextures()

Specified by:
getCachedTextures in class TextureCache

clear

public void clear()
Clears the Texture-cache.

Specified by:
clear in class TextureCache