
com.github.chaosfirebolt.converter.api.cache.DefaultParserCache Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of roman-numeral-converter Show documentation
Show all versions of roman-numeral-converter Show documentation
Library for converting roman numerals to arabic and vice versa.
package com.github.chaosfirebolt.converter.api.cache;
import com.github.chaosfirebolt.converter.Parser;
import com.github.chaosfirebolt.converter.api.OperationFailure;
import com.github.chaosfirebolt.converter.api.cache.storage.MapStorage;
import com.github.chaosfirebolt.converter.api.initialization.NoOpMapData;
import com.github.chaosfirebolt.converter.constants.IntegerType;
import java.util.EnumMap;
/**
* Default parser cache implementation
*/
public final class DefaultParserCache extends DefaultCache implements ParserCache {
/**
* Creates new instance with default parameters
*/
public DefaultParserCache() {
super(MapStorage.lenient(() -> new EnumMap<>(IntegerType.class)), IntegerType::getParser, new NoOpMapData<>(), () -> new OperationFailure("Caching failure"));
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy