| org.apache.tools.ant.types.selectors.modifiedselector.Cache
All known Subclasses: org.apache.tools.ant.types.selectors.modifiedselector.PropertiesfileCache, org.apache.tools.ant.types.selectors.MockCache,
Cache | public interface Cache (Code) | | A Cache let the user store key-value-pairs in a permanent manner and access
them.
It is possible that a client uses get() before load() therefore the
implementation must ensure that no error occurred because of the wrong
order.
The implementing class should implement a useful toString() method.
version: 2003-09-13 since: Ant 1.6 |
Method Summary | |
void | delete() Deletes the cache. | Object | get(Object key) Returns a value for a given key from the cache. | boolean | isValid() Checks its prerequisites. | Iterator | iterator() Returns an iterator over the keys in the cache. | void | load() Loads the cache, must handle not existing cache. | void | put(Object key, Object value) Saves a key-value-pair in the cache. | void | save() Saves modification of the cache. |
delete | void delete()(Code) | | Deletes the cache. If file based the file has to be deleted also.
|
get | Object get(Object key)(Code) | | Returns a value for a given key from the cache.
Parameters: key - the key the stored value |
isValid | boolean isValid()(Code) | | Checks its prerequisites.
true if all is ok, otherwise false. |
iterator | Iterator iterator()(Code) | | Returns an iterator over the keys in the cache.
An iterator over the keys. |
load | void load()(Code) | | Loads the cache, must handle not existing cache.
|
put | void put(Object key, Object value)(Code) | | Saves a key-value-pair in the cache.
Parameters: key - the key Parameters: value - the value |
save | void save()(Code) | | Saves modification of the cache.
|
|
|