Package games.stendhal.client.sprite
Class SpriteCache
java.lang.Object
games.stendhal.client.sprite.SpriteCache
A cache of keyed sprites.
-
Constructor Summary
-
Method Summary
-
Constructor Details
-
SpriteCache
public SpriteCache()Create a sprite cache.
-
-
Method Details
-
add
Add a sprite to the cache.- Parameters:
key
- The cache key.sprite
- The sprite to add.
-
get
Get the shared instance.- Returns:
- The shared [singleton] instance.
-
get
Get a cached sprite.- Parameters:
key
- The cache key.- Returns:
- A sprite, or
null
if not found.
-