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 testSubListByKey() {
          CategorizedCircularBuffer<String, Long> ccb = new CategorizedCircularBuffer<String, Long>(6);
  
          ccb.add(1L, "e0"); // 5 ibk2
          ccb.add(2L, "e1"); // 4
          ccb.add(1L, "e2"); // 3 ibk1
          ccb.add(2L, "e3"); // 2
          ccb.add(1L, "e4"); // 1 ibk0
          ccb.add(2L, "e5"); // 0
  
          List<String> l = ccb.subListByKey(1L, 1, 3);
          assertEquals(2, l.size());
          assertEquals("e2", l.get(0));
          assertEquals("e0", l.get(1));
      }
test_case.class_method_signature: CategorizedCircularBufferTest.testSubListByKey()
test_case.full_signature: @Test public void testSubListByKey()
test_case.identifier: testSubListByKey
test_case.invocations: add add add add add add subListByKey assertEquals size assertEquals get assertEquals get
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void testSubListByKey()
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: @SuppressWarnings("unchecked")
      public List<T> subListByKey(K key, int fromIndex, int toIndex) {
          LinkedList<T> typedList = typedLists.get(key);
          if (typedList == null) {
              return Collections.EMPTY_LIST;
          }
  
          return typedList.subList(fromIndex, toIndex);
      }
focal_method.class_method_signature: CategorizedCircularBuffer.subListByKey(K key, int fromIndex, int toIndex)
focal_method.full_signature: @SuppressWarnings("unchecked") public List<T> subListByKey(K key, int fromIndex, int toIndex)
focal_method.identifier: subListByKey
focal_method.invocations: get subList
focal_method.modifiers: @SuppressWarnings("unchecked") public
focal_method.parameters: (K key, int fromIndex, int toIndex)
focal_method.return: List<T>
focal_method.signature: List<T> subListByKey(K key, int fromIndex, int toIndex)