New file based cache for creature types and card names. +Test for cache consistency.

This commit is contained in:
magenoxx 2012-06-25 15:01:31 +04:00
parent 7d4aaec015
commit b6bb69f8b8
4 changed files with 173 additions and 0 deletions

36
Mage.Sets/src/mage/cache/Cache.java vendored Normal file
View file

@ -0,0 +1,36 @@
package mage.cache;
import java.io.Serializable;
import java.util.HashMap;
import java.util.Map;
/**
* Cache model
*
* @author noxx
*/
public class Cache implements Serializable {
private int version;
private String name;
private Map<String, Object> cacheObjects = new HashMap<String, Object>();
public Cache(String name, int version) {
this.name = name;
this.version = version;
}
public int getVersion() {
return version;
}
public String getName() {
return name;
}
public Map<String, Object> getCacheObjects() {
return cacheObjects;
}
private static final long serialVersionUID = 1L;
}