|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.apache.tools.ant.types.selectors.modifiedselector.PropertiesfileCache
public class PropertiesfileCache
Use java.util.Properties for storing the values. The use of this Cache-implementation requires the use of the parameter for defining, where to store the properties file. The ModifiedSelector sets the cachefile to the default value cache.properties. Supported s are:
| name | values | description | required |
|---|---|---|---|
| cache.cachefile | path to file | the name of the properties file | yes |
| Constructor Summary | |
|---|---|
PropertiesfileCache()
Bean-Constructor. |
|
PropertiesfileCache(java.io.File cachefile)
Constructor. |
|
| Method Summary | |
|---|---|
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<java.lang.String> |
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(). |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public PropertiesfileCache()
public PropertiesfileCache(java.io.File cachefile)
cachefile - set the cachefile| Method Detail |
|---|
public void setCachefile(java.io.File file)
file - new valuepublic java.io.File getCachefile()
public boolean isValid()
isValid in interface Cachepublic void load()
load in interface Cachepublic void save()
save in interface Cachepublic void delete()
delete in interface Cachepublic java.lang.Object get(java.lang.Object key)
get in interface Cachekey - the key
public void put(java.lang.Object key,
java.lang.Object value)
put in interface Cachekey - the keyvalue - the valuepublic java.util.Iterator<java.lang.String> iterator()
iterator in interface Cachepublic java.lang.String toString()
toString in class java.lang.Object
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||