|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.ctdp.rfdynhud.util.DefaultImageCache
public class DefaultImageCache
Default implementation of the image cache meant for game runtime.
Constructor Summary | |
---|---|
DefaultImageCache()
|
Method Summary | |
---|---|
ImageTemplate |
add(java.lang.String name,
long lastModified,
ImageTemplate image)
Adds an image to the cache. |
void |
check(java.lang.String name,
long lastModified)
Checks, whether an image is cached by the given name and matches the given 'lastModified' date. |
boolean |
contains(java.lang.String name)
Checks, whether an image exists in the cache by the given name. |
ImageTemplate |
get(java.lang.String name)
Gets the cached image by the given name. |
int |
getSize()
|
ImageTemplate |
remove(java.lang.String name)
Removes an image from the cache. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public DefaultImageCache()
Method Detail |
---|
public final int getSize()
public ImageTemplate add(java.lang.String name, long lastModified, ImageTemplate image)
add
in interface ImageCache
name
- the name to cache bylastModified
- the last modified timestampimage
- the image to cache
public ImageTemplate remove(java.lang.String name)
remove
in interface ImageCache
name
- the name it is cached by
public void check(java.lang.String name, long lastModified)
check
in interface ImageCache
name
- the name to search forlastModified
- the last modified timestamppublic boolean contains(java.lang.String name)
contains
in interface ImageCache
name
- the name to search for
true
, if the image is present, false
otherwise.public ImageTemplate get(java.lang.String name)
get
in interface ImageCache
name
- the name to search for
null
, if not present.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |