public abstract class AbstractFilePersistenceStrategy extends Object implements PersistenceStrategy
Modifier and Type | Class and Description |
---|---|
protected class |
AbstractFilePersistenceStrategy.ValidFilenameFilter |
protected class |
AbstractFilePersistenceStrategy.XmlMapEntriesIterator |
Constructor and Description |
---|
AbstractFilePersistenceStrategy(File baseDirectory,
XStream xstream,
String encoding) |
Modifier and Type | Method and Description |
---|---|
boolean |
containsKey(Object key) |
protected abstract Object |
extractKey(String name)
Given a filename, the unescape method returns the key which originated it.
|
Object |
get(Object key) |
protected ConverterLookup |
getConverterLookup() |
protected Mapper |
getMapper() |
protected abstract String |
getName(Object key)
Given a key, the escape method returns the filename which shall be used.
|
protected boolean |
isValid(File dir,
String name) |
Iterator |
iterator() |
Object |
put(Object key,
Object value) |
Object |
remove(Object key) |
int |
size() |
protected ConverterLookup getConverterLookup()
protected Mapper getMapper()
protected abstract Object extractKey(String name)
name
- the filenameprotected abstract String getName(Object key)
key
- the keypublic Object put(Object key, Object value)
put
in interface PersistenceStrategy
public Iterator iterator()
iterator
in interface PersistenceStrategy
public int size()
size
in interface PersistenceStrategy
public boolean containsKey(Object key)
public Object get(Object key)
get
in interface PersistenceStrategy
public Object remove(Object key)
remove
in interface PersistenceStrategy
Copyright © 2004–2017 XStream. All rights reserved.