Loading src/main/java/cz/muni/fi/pb162/hw02/Cache.java +4 −1 Original line number Diff line number Diff line Loading @@ -3,13 +3,16 @@ package cz.muni.fi.pb162.hw02; /** * Cache interface * @author Jakub Cechacek * * @param <K> Key type * @param <V> Value type */ public interface Cache<K, V> { /** * Retrieves object from cache * @param key key under which the object is stored * @return * @return object stored under given key */ V get(K key); Loading src/main/java/cz/muni/fi/pb162/hw02/CacheFactory.java +11 −1 Original line number Diff line number Diff line package cz.muni.fi.pb162.hw02; /** * * Interface for cache factories * @author Jakub Cechacek * * @param <K> Key type * @param <V> Value type */ public interface CacheFactory<K, V> { /** * Creates an instance of a cache * @param type type of the cache * @param size size of the cache * @return cache */ Cache<K, V> create(CacheType type, int size); } Loading
src/main/java/cz/muni/fi/pb162/hw02/Cache.java +4 −1 Original line number Diff line number Diff line Loading @@ -3,13 +3,16 @@ package cz.muni.fi.pb162.hw02; /** * Cache interface * @author Jakub Cechacek * * @param <K> Key type * @param <V> Value type */ public interface Cache<K, V> { /** * Retrieves object from cache * @param key key under which the object is stored * @return * @return object stored under given key */ V get(K key); Loading
src/main/java/cz/muni/fi/pb162/hw02/CacheFactory.java +11 −1 Original line number Diff line number Diff line package cz.muni.fi.pb162.hw02; /** * * Interface for cache factories * @author Jakub Cechacek * * @param <K> Key type * @param <V> Value type */ public interface CacheFactory<K, V> { /** * Creates an instance of a cache * @param type type of the cache * @param size size of the cache * @return cache */ Cache<K, V> create(CacheType type, int size); }