test_class.file: src/core/services-impl/src/test/java/it/geosolutions/geostore/util/CategorizedCircularBufferTest.java
test_class.identifier: CategorizedCircularBufferTest
test_class.superclass: extends TestCase
test_case.body: @Test
      public void testSubList() {
          CategorizedCircularBuffer<String, Long> ccb = new CategorizedCircularBuffer<String, Long>(4);
  
          ccb.add(0L, "e0"); // 3
          ccb.add(1L, "e2"); // 2
          ccb.add(1L, "e3"); // 1
          ccb.add(3L, "e4"); // idx 0
  
          {
              List<String> l = ccb.subList(2, 4);
              assertEquals(2, l.size());
              assertEquals("e2", l.get(0));
              assertEquals("e0", l.get(1));
  
              List<String> kl = ccb.subListByKey(1L, 0, 2);
              assertEquals(2, kl.size());
              assertEquals("e3", kl.get(0));
              assertEquals("e2", kl.get(1));
          }
  
          ccb.add(3L, "e5"); // idx 0; other will scroll up
  
          {
              List<String> l = ccb.subList(2, 4);
              assertEquals(2, l.size());
              assertEquals("e3", l.get(0));
              assertEquals("e2", l.get(1));
          }
  
          ccb.add(3L, "e6"); // idx 0; other will scroll up
  
          {
              List<String> kl = ccb.subListByKey(1L, 0, 1);
              assertEquals(1, kl.size());
              assertEquals("e3", kl.get(0));
          }
      }
test_case.class_method_signature: CategorizedCircularBufferTest.testSubList()
test_case.full_signature: @Test public void testSubList()
test_case.identifier: testSubList
test_case.invocations: add add add add subList assertEquals size assertEquals get assertEquals get subListByKey assertEquals size assertEquals get assertEquals get add subList assertEquals size assertEquals get assertEquals get add subListByKey assertEquals size assertEquals get
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void testSubList()
focal_class.declarator: maxSize
focal_class.modifier: private final
focal_class.original_string: private final int maxSize;
focal_class.type: int
focal_class.var_name: maxSize
focal_class.declarator: mainList
focal_class.original_string: LinkedList<Pair<T, K>> mainList;
focal_class.type: LinkedList<Pair<T, K>>
focal_class.var_name: mainList
focal_class.declarator: typedLists = new HashMap<K, LinkedList<T>>()
focal_class.modifier: private
focal_class.original_string: private Map<K, LinkedList<T>> typedLists = new HashMap<K, LinkedList<T>>();
focal_class.type: Map<K, LinkedList<T>>
focal_class.var_name: typedLists
focal_class.file: src/core/services-impl/src/main/java/it/geosolutions/geostore/util/CategorizedCircularBuffer.java
focal_class.identifier: CategorizedCircularBuffer
focal_class.class_method_signature: CategorizedCircularBuffer.CategorizedCircularBuffer(int maxCount)
focal_class.full_signature: public  CategorizedCircularBuffer(int maxCount)
focal_class.identifier: CategorizedCircularBuffer
focal_class.modifiers: public
focal_class.parameters: (int maxCount)
focal_class.signature:  CategorizedCircularBuffer(int maxCount)
focal_class.class_method_signature: CategorizedCircularBuffer.add(K key, T value)
focal_class.full_signature: public void add(K key, T value)
focal_class.identifier: add
focal_class.modifiers: public
focal_class.parameters: (K key, T value)
focal_class.return: void
focal_class.signature: void add(K key, T value)
focal_class.class_method_signature: CategorizedCircularBuffer.removeLastEntry()
focal_class.full_signature: private void removeLastEntry()
focal_class.identifier: removeLastEntry
focal_class.modifiers: private
focal_class.parameters: ()
focal_class.return: void
focal_class.signature: void removeLastEntry()
focal_class.class_method_signature: CategorizedCircularBuffer.subList(int fromIndex, int toIndex)
focal_class.full_signature: public List<T> subList(int fromIndex, int toIndex)
focal_class.identifier: subList
focal_class.modifiers: public
focal_class.parameters: (int fromIndex, int toIndex)
focal_class.return: List<T>
focal_class.signature: List<T> subList(int fromIndex, int toIndex)
focal_class.class_method_signature: CategorizedCircularBuffer.size()
focal_class.full_signature: public int size()
focal_class.identifier: size
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: int
focal_class.signature: int size()
focal_class.class_method_signature: CategorizedCircularBuffer.subListByKey(K key, int fromIndex, int toIndex)
focal_class.full_signature: @SuppressWarnings("unchecked") public List<T> subListByKey(K key, int fromIndex, int toIndex)
focal_class.identifier: subListByKey
focal_class.modifiers: @SuppressWarnings("unchecked") public
focal_class.parameters: (K key, int fromIndex, int toIndex)
focal_class.return: List<T>
focal_class.signature: List<T> subListByKey(K key, int fromIndex, int toIndex)
focal_class.class_method_signature: CategorizedCircularBuffer.sizeByKey(K key)
focal_class.full_signature: public int sizeByKey(K key)
focal_class.identifier: sizeByKey
focal_class.modifiers: public
focal_class.parameters: (K key)
focal_class.return: int
focal_class.signature: int sizeByKey(K key)
focal_method.body: public List<T> subList(int fromIndex, int toIndex) {
          List<T> ret = new ArrayList<T>(toIndex - fromIndex);
          for (Pair<T, K> pair : mainList.subList(fromIndex, toIndex)) {
              ret.add(pair.value);
          }
  
          return ret;
      }
focal_method.class_method_signature: CategorizedCircularBuffer.subList(int fromIndex, int toIndex)
focal_method.full_signature: public List<T> subList(int fromIndex, int toIndex)
focal_method.identifier: subList
focal_method.invocations: subList add
focal_method.modifiers: public
focal_method.parameters: (int fromIndex, int toIndex)
focal_method.return: List<T>
focal_method.signature: List<T> subList(int fromIndex, int toIndex)