org.apache.tools.ant.types.selectors.modifiedselector
public class PropertiesfileCache extends java.lang.Object implements Cache
name | values | description | required |
---|---|---|---|
cache.cachefile | path to file | the name of the properties file | yes |
Constructor and Description |
---|
PropertiesfileCache()
Bean-Constructor.
|
PropertiesfileCache(java.io.File cachefile)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
void |
delete()
Deletes the cache and its underlying file.
|
java.lang.Object |
get(java.lang.Object key)
Returns a value for a given key from the cache.
|
java.io.File |
getCachefile()
Getter.
|
boolean |
isValid()
This cache is valid if the cachefile is set.
|
java.util.Iterator |
iterator()
Returns an iterator over the keys in the cache.
|
void |
load()
Load the cache from underlying properties file.
|
void |
put(java.lang.Object key,
java.lang.Object value)
Saves a key-value-pair in the cache.
|
void |
save()
Saves modification of the cache.
|
void |
setCachefile(java.io.File file)
Setter.
|
java.lang.String |
toString()
Override Object.toString().
|
public PropertiesfileCache()
public PropertiesfileCache(java.io.File cachefile)
cachefile
- set the cachefilepublic void setCachefile(java.io.File file)
file
- new valuepublic java.io.File getCachefile()
public boolean isValid()
public void load()
public void save()
public void delete()
public java.lang.Object get(java.lang.Object key)
public void put(java.lang.Object key, java.lang.Object value)
public java.util.Iterator iterator()
public java.lang.String toString()
toString
in class java.lang.Object