de.be4.classicalb.core.parser.CachingDefinitionFileProvider Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of bparser Show documentation
Show all versions of bparser Show documentation
Part of the ProB Parser library
The newest version!
package de.be4.classicalb.core.parser;
import java.util.HashMap;
import java.util.Map;
public class CachingDefinitionFileProvider extends PlainFileContentProvider
implements IDefinitionFileProvider {
private final Map store = new HashMap<>();
/**
* s. {@link PlainFileContentProvider#PlainFileContentProvider()}
*/
public CachingDefinitionFileProvider() {
super();
}
@Override
public IDefinitions getDefinitions(final String filename) {
return store.get(filename);
}
@Override
public void storeDefinition(final String filename,
final IDefinitions definitions) {
store.put(filename, definitions);
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy