test_class.file: geoserver/webapp/api-composer/src/test/java/com/boundlessgeo/geoserver/util/RecentObjectCacheTest.java
test_class.identifier: RecentObjectCacheTest
test_case.body: @Test
      public void testList() {
          RecentObjectCache cache = new RecentObjectCache();
  
          cache.add(LayerGroupInfo.class, map("one"));
          cache.add(LayerGroupInfo.class, map("two"));
          cache.add(LayerGroupInfo.class, map("three"));
  
          Iterator<Ref> it = cache.list(LayerGroupInfo.class).iterator();
          assertTrue(it.hasNext());
          assertEquals("three", it.next().id);
          assertTrue(it.hasNext());
          assertEquals("two", it.next().id);
          assertTrue(it.hasNext());
          assertEquals("one", it.next().id);
      }
test_case.class_method_signature: RecentObjectCacheTest.testList()
test_case.full_signature: @Test public void testList()
test_case.identifier: testList
test_case.invocations: add map add map add map iterator list assertTrue hasNext assertEquals next assertTrue hasNext assertEquals next assertTrue hasNext assertEquals next
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void testList()
focal_class.declarator: DEFAULT_SIZE = 5
focal_class.modifier: public static final
focal_class.original_string: public static final int DEFAULT_SIZE = 5;
focal_class.type: int
focal_class.var_name: DEFAULT_SIZE
focal_class.declarator: cache
focal_class.original_string: LoadingCache<Class<?>, EvictingQueue<Ref>> cache;
focal_class.type: LoadingCache<Class<?>, EvictingQueue<Ref>>
focal_class.var_name: cache
focal_class.file: geoserver/webapp/api-composer/src/main/java/com/boundlessgeo/geoserver/util/RecentObjectCache.java
focal_class.identifier: RecentObjectCache
focal_class.class_method_signature: RecentObjectCache.RecentObjectCache()
focal_class.full_signature: public  RecentObjectCache()
focal_class.identifier: RecentObjectCache
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.signature:  RecentObjectCache()
focal_class.class_method_signature: RecentObjectCache.RecentObjectCache(final int size)
focal_class.full_signature: public  RecentObjectCache(final int size)
focal_class.identifier: RecentObjectCache
focal_class.modifiers: public
focal_class.parameters: (final int size)
focal_class.signature:  RecentObjectCache(final int size)
focal_class.class_method_signature: RecentObjectCache.add(Class<T> clazz, T obj)
focal_class.full_signature: public void add(Class<T> clazz, T obj)
focal_class.identifier: add
focal_class.modifiers: public
focal_class.parameters: (Class<T> clazz, T obj)
focal_class.return: void
focal_class.signature: void add(Class<T> clazz, T obj)
focal_class.class_method_signature: RecentObjectCache.add(Class<T> clazz, T obj, String workspace)
focal_class.full_signature: public void add(Class<T> clazz, T obj, String workspace)
focal_class.identifier: add
focal_class.modifiers: public
focal_class.parameters: (Class<T> clazz, T obj, String workspace)
focal_class.return: void
focal_class.signature: void add(Class<T> clazz, T obj, String workspace)
focal_class.class_method_signature: RecentObjectCache.list(Class<T> clazz)
focal_class.full_signature: public Iterable<Ref> list(Class<T> clazz)
focal_class.identifier: list
focal_class.modifiers: public
focal_class.parameters: (Class<T> clazz)
focal_class.return: Iterable<Ref>
focal_class.signature: Iterable<Ref> list(Class<T> clazz)
focal_class.class_method_signature: RecentObjectCache.remove(Class<T> clazz, T obj)
focal_class.full_signature: public boolean remove(Class<T> clazz, T obj)
focal_class.identifier: remove
focal_class.modifiers: public
focal_class.parameters: (Class<T> clazz, T obj)
focal_class.return: boolean
focal_class.signature: boolean remove(Class<T> clazz, T obj)
focal_class.class_method_signature: RecentObjectCache.q(Class<T> clazz)
focal_class.full_signature:  EvictingQueue<Ref> q(Class<T> clazz)
focal_class.identifier: q
focal_class.parameters: (Class<T> clazz)
focal_class.return: EvictingQueue<Ref>
focal_class.signature: EvictingQueue<Ref> q(Class<T> clazz)
focal_method.body: public <T extends Info> Iterable<Ref> list(Class<T> clazz) {
          List<Ref> list = null;
  
          EvictingQueue<Ref> q = q(clazz);
          synchronized (q) {
              list = new ArrayList(q);
          }
  
          Collections.reverse(list);
          return new LinkedHashSet<>(list);
      }
focal_method.class_method_signature: RecentObjectCache.list(Class<T> clazz)
focal_method.full_signature: public Iterable<Ref> list(Class<T> clazz)
focal_method.identifier: list
focal_method.invocations: q reverse
focal_method.modifiers: public
focal_method.parameters: (Class<T> clazz)
focal_method.return: Iterable<Ref>
focal_method.signature: Iterable<Ref> list(Class<T> clazz)