java.lang.Objectcom.realtime.crossfire.jxclient.faces.MemoryImageCache
public class MemoryImageCache
Simple in-memory cache implementing the ImageCache interface. Primary
use is from regression tests.
| Field Summary | |
|---|---|
private java.util.Map<Face,javax.swing.ImageIcon> |
faces
The cache contents. |
| Constructor Summary | |
|---|---|
MemoryImageCache()
|
|
| Method Summary | |
|---|---|
javax.swing.ImageIcon |
load(Face face)
Retrieves an image from the cache. |
void |
save(Face face,
javax.swing.ImageIcon imageIcon)
Stores an ImageIcon into the cache. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
@NotNull private final java.util.Map<Face,javax.swing.ImageIcon> faces
| Constructor Detail |
|---|
public MemoryImageCache()
| Method Detail |
|---|
@Nullable
public javax.swing.ImageIcon load(@NotNull
Face face)
load in interface ImageCacheface - the face to retrieve
null if the cache does not
contain the image
public void save(@NotNull
Face face,
@NotNull
javax.swing.ImageIcon imageIcon)
ImageIcon into the cache.
save in interface ImageCacheface - the face to saveimageIcon - the image icon to store