test_class.file: kiji-mapreduce/src/test/java/org/kiji/mapreduce/util/TestLruCache.java
test_class.identifier: TestLruCache
test_case.body: @Test
    public void testCache() {
      LruCache<String, String> cache = LruCache.create(4);
      cache.put("a", "a1");
      cache.put("b", "b1");
      cache.put("c", "c1");
      cache.put("d", "d1");
      cache.put("e", "e1");
      assertFalse(cache.containsKey("a")); // e evicts a.
  
      assertEquals("b1", cache.get("b")); // This is still there.
      cache.put("f", "f1");
      assertFalse(cache.containsKey("c")); // f now evicts c, since b was recently used.
  
      cache.put("g", null);
      assertTrue(cache.containsKey("g"));
      assertNull(cache.get("g"));
      assertFalse(cache.containsKey("d")); // d evicted by g.
      assertNull(cache.get("d")); // But accessing this just returns null, not an error.
    }
test_case.class_method_signature: TestLruCache.testCache()
test_case.full_signature: @Test public void testCache()
test_case.identifier: testCache
test_case.invocations: create put put put put put assertFalse containsKey assertEquals get put assertFalse containsKey put assertTrue containsKey assertNull get assertFalse containsKey assertNull get
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void testCache()
focal_class.declarator: serialVersionUID = 1
focal_class.modifier: private static final
focal_class.original_string: private static final long serialVersionUID = 1;
focal_class.type: long
focal_class.var_name: serialVersionUID
focal_class.declarator: mMaxSize
focal_class.modifier: private
focal_class.original_string: private int mMaxSize;
focal_class.type: int
focal_class.var_name: mMaxSize
focal_class.file: kiji-mapreduce/src/main/java/org/kiji/mapreduce/util/LruCache.java
focal_class.identifier: LruCache
focal_class.class_method_signature: LruCache.LruCache(int maxSize)
focal_class.full_signature: private  LruCache(int maxSize)
focal_class.identifier: LruCache
focal_class.modifiers: private
focal_class.parameters: (int maxSize)
focal_class.signature:  LruCache(int maxSize)
focal_class.class_method_signature: LruCache.create(int maxSize)
focal_class.full_signature: public static LruCache<K, V> create(int maxSize)
focal_class.identifier: create
focal_class.modifiers: public static
focal_class.parameters: (int maxSize)
focal_class.return: LruCache<K, V>
focal_class.signature: LruCache<K, V> create(int maxSize)
focal_class.class_method_signature: LruCache.removeEldestEntry(Map.Entry<K, V> eldest)
focal_class.full_signature: @Override protected boolean removeEldestEntry(Map.Entry<K, V> eldest)
focal_class.identifier: removeEldestEntry
focal_class.modifiers: @Override protected
focal_class.parameters: (Map.Entry<K, V> eldest)
focal_class.return: boolean
focal_class.signature: boolean removeEldestEntry(Map.Entry<K, V> eldest)
focal_class.class_method_signature: LruCache.getMaxSize()
focal_class.full_signature: public int getMaxSize()
focal_class.identifier: getMaxSize
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: int
focal_class.signature: int getMaxSize()
focal_class.superclass: extends LinkedHashMap<K, V>
focal_method.body: public static <K, V> LruCache<K, V> create(int maxSize) {
      return new LruCache<K, V>(maxSize);
    }
focal_method.class_method_signature: LruCache.create(int maxSize)
focal_method.full_signature: public static LruCache<K, V> create(int maxSize)
focal_method.identifier: create
focal_method.modifiers: public static
focal_method.parameters: (int maxSize)
focal_method.return: LruCache<K, V>
focal_method.signature: LruCache<K, V> create(int maxSize)