test_class.declarator: list
test_class.modifier: protected
test_class.original_string: protected NodeStateEntryList list;
test_class.type: NodeStateEntryList
test_class.var_name: list
test_class.file: oak-run/src/test/java/org/apache/jackrabbit/oak/index/indexer/document/flatfile/linkedList/FlatFileBufferLinkedListTest.java
test_class.identifier: FlatFileBufferLinkedListTest
test_case.body: @Test
      public void iterator() {
          assertEquals("empty list must be 0-sized", 0, Iterators.size(list.iterator()));
  
          list.add(testNode("/"));
          assertEquals("single entry list must be 1-sized", 1, Iterators.size(list.iterator()));
          assertEquals("single entry list must be 1-sized on separate iterators",
                  1, Iterators.size(list.iterator()));
  
          list.add(testNode("/a"));
          assertEquals("2 entries in list must be 2-sized", 2, Iterators.size(list.iterator()));
  
          assertEquals("2 entries in list must be 2-sized on separate iterators",
                  2, Iterators.size(list.iterator()));
  
          Iterator<NodeStateEntry> iter2 = list.iterator();
          Iterator<NodeStateEntry> iter1 = list.iterator();
          assertEquals("/", iter2.next().toString());
          assertEquals("2 entries in list must be 1-sized after consuming an item",
                  1, Iterators.size(iter2));
          assertEquals("2 entries in list must be 2-sized even if some other iterator consumed an item",
                  2, Iterators.size(iter1));
  
          list.add(testNode("/b"));
          iter1 = list.iterator();
          iter2 = list.iterator();
  
          //move iter to point at node being removed below
          assertEquals("/", iter1.next().toString());
          // move iter beyond node being removed - this should remain valid
          assertEquals("/", iter2.next().toString());
          assertEquals("/a", iter2.next().toString());
  
          assertEquals("/", list.remove().toString());
          assertEquals("/a", list.remove().toString());
          try {
              iter1.next();
              fail("Iterator state once removed from list can't be traversed");
          } catch (IllegalStateException ise) {
              //ignore
          }
          //this should work
          assertEquals(testNode("/b"), iter2.next());
          assertEquals("2 entries in list must be 1-sized after removal of an iterm",
                  1, Iterators.size(list.iterator()));
      }
test_case.class_method_signature: FlatFileBufferLinkedListTest.iterator()
test_case.full_signature: @Test public void iterator()
test_case.identifier: iterator
test_case.invocations: assertEquals size iterator add testNode assertEquals size iterator assertEquals size iterator add testNode assertEquals size iterator assertEquals size iterator iterator iterator assertEquals toString next assertEquals size assertEquals size add testNode iterator iterator assertEquals toString next assertEquals toString next assertEquals toString next assertEquals toString remove assertEquals toString remove next fail assertEquals testNode next assertEquals size iterator
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void iterator()
focal_class.declarator: head = new ListNode()
focal_class.modifier: private
focal_class.original_string: private ListNode head = new ListNode();
focal_class.type: ListNode
focal_class.var_name: head
focal_class.declarator: tail = head
focal_class.modifier: private
focal_class.original_string: private ListNode tail = head;
focal_class.type: ListNode
focal_class.var_name: tail
focal_class.declarator: size = 0
focal_class.modifier: private
focal_class.original_string: private int size = 0;
focal_class.type: int
focal_class.var_name: size
focal_class.declarator: memUsage = 0
focal_class.modifier: private
focal_class.original_string: private long memUsage = 0;
focal_class.type: long
focal_class.var_name: memUsage
focal_class.declarator: memLimit
focal_class.modifier: private final
focal_class.original_string: private final long memLimit;
focal_class.type: long
focal_class.var_name: memLimit
focal_class.file: oak-run/src/main/java/org/apache/jackrabbit/oak/index/indexer/document/flatfile/linkedList/FlatFileBufferLinkedList.java
focal_class.identifier: FlatFileBufferLinkedList
focal_class.interfaces: implements NodeStateEntryList
focal_class.class_method_signature: FlatFileBufferLinkedList.FlatFileBufferLinkedList()
focal_class.full_signature: public  FlatFileBufferLinkedList()
focal_class.identifier: FlatFileBufferLinkedList
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.signature:  FlatFileBufferLinkedList()
focal_class.class_method_signature: FlatFileBufferLinkedList.FlatFileBufferLinkedList(long memLimit)
focal_class.full_signature: public  FlatFileBufferLinkedList(long memLimit)
focal_class.identifier: FlatFileBufferLinkedList
focal_class.modifiers: public
focal_class.parameters: (long memLimit)
focal_class.signature:  FlatFileBufferLinkedList(long memLimit)
focal_class.class_method_signature: FlatFileBufferLinkedList.add(@NotNull NodeStateEntry item)
focal_class.full_signature: public void add(@NotNull NodeStateEntry item)
focal_class.identifier: add
focal_class.modifiers: public
focal_class.parameters: (@NotNull NodeStateEntry item)
focal_class.return: void
focal_class.signature: void add(@NotNull NodeStateEntry item)
focal_class.class_method_signature: FlatFileBufferLinkedList.remove()
focal_class.full_signature: public NodeStateEntry remove()
focal_class.identifier: remove
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: NodeStateEntry
focal_class.signature: NodeStateEntry remove()
focal_class.class_method_signature: FlatFileBufferLinkedList.iterator()
focal_class.full_signature: @Override public Iterator<NodeStateEntry> iterator()
focal_class.identifier: iterator
focal_class.modifiers: @Override public
focal_class.parameters: ()
focal_class.return: Iterator<NodeStateEntry>
focal_class.signature: Iterator<NodeStateEntry> iterator()
focal_class.class_method_signature: FlatFileBufferLinkedList.size()
focal_class.full_signature: @Override public int size()
focal_class.identifier: size
focal_class.modifiers: @Override public
focal_class.parameters: ()
focal_class.return: int
focal_class.signature: int size()
focal_class.class_method_signature: FlatFileBufferLinkedList.isEmpty()
focal_class.full_signature: @Override public boolean isEmpty()
focal_class.identifier: isEmpty
focal_class.modifiers: @Override public
focal_class.parameters: ()
focal_class.return: boolean
focal_class.signature: boolean isEmpty()
focal_class.class_method_signature: FlatFileBufferLinkedList.estimatedMemoryUsage()
focal_class.full_signature: @Override public long estimatedMemoryUsage()
focal_class.identifier: estimatedMemoryUsage
focal_class.modifiers: @Override public
focal_class.parameters: ()
focal_class.return: long
focal_class.signature: long estimatedMemoryUsage()
focal_class.class_method_signature: FlatFileBufferLinkedList.close()
focal_class.full_signature: @Override public void close()
focal_class.identifier: close
focal_class.modifiers: @Override public
focal_class.parameters: ()
focal_class.return: void
focal_class.signature: void close()
focal_method.body: @Override
      public Iterator<NodeStateEntry> iterator() {
          return NodeIterator.iteratorFor(head);
      }
focal_method.class_method_signature: FlatFileBufferLinkedList.iterator()
focal_method.full_signature: @Override public Iterator<NodeStateEntry> iterator()
focal_method.identifier: iterator
focal_method.invocations: iteratorFor
focal_method.modifiers: @Override public
focal_method.parameters: ()
focal_method.return: Iterator<NodeStateEntry>
focal_method.signature: Iterator<NodeStateEntry> iterator()