Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /*
- Cache cache = new Cache(2);
- cache.set("1", "1");
- cache.toString();
- cache.set("2", "2");
- cache.toString();
- Assert.assertEquals("1", cache.get("1"));
- cache.set("3", "3");
- cache.toString();
- cache.set("4", "4");
- cache.toString();
- Assert.assertNull(cache.get("1"));
- Assert.assertEquals("3", cache.get("3"));
- Assert.assertEquals("4", cache.get("4"));
- */
- public class Cache {
- public Cache(int capacity) {
- }
- public void put(String key, Object o) {
- }
- public String get(String key) {
- return null;
- }
- }
Add Comment
Please, Sign In to add comment