All Downloads are FREE. Search and download functionalities are using the official Maven repository.

de.be4.classicalb.core.parser.CachingDefinitionFileProvider Maven / Gradle / Ivy

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