test_class.file: oak-core/src/test/java/org/apache/jackrabbit/oak/query/index/TraversingIndexTest.java
test_class.identifier: TraversingIndexTest
test_case.body: @Test
      public void traverse() throws Exception {
          NodeBuilder builder = EMPTY_NODE.builder();
          NodeBuilder parents = builder.child("parents");
          parents.child("p0").setProperty("id", 0);
          parents.child("p1").setProperty("id", 1);
          parents.child("p2").setProperty("id", 2);
          NodeBuilder children = builder.child("children");
          children.child("c1").setProperty("p", "1");
          children.child("c2").setProperty("p", "1");
          children.child("c3").setProperty("p", "2");
          children.child("c4").setProperty("p", "3");
          NodeState root = builder.getNodeState();
  
          TraversingIndex t = new TraversingIndex();
  
          FilterImpl f = FilterImpl.newTestInstance();
  
          f.setPath("/");
          Cursor c = t.query(f, root);
          List<String> paths = new ArrayList<String>();
          while (c.hasNext()) {
              paths.add(c.next().getPath());
          }
          Collections.sort(paths);
  
          assertEquals(Arrays.asList(
                  "/", "/children", "/children/c1", "/children/c2",
                  "/children/c3", "/children/c4", "/parents",
                  "/parents/p0", "/parents/p1",  "/parents/p2"),
                  paths);
          assertFalse(c.hasNext());
          // endure it stays false
          assertFalse(c.hasNext());
  
          f.setPath("/nowhere");
          c = t.query(f, root);
          assertFalse(c.hasNext());
          // endure it stays false
          assertFalse(c.hasNext());
      }
test_case.class_method_signature: TraversingIndexTest.traverse()
test_case.full_signature: @Test public void traverse()
test_case.identifier: traverse
test_case.invocations: builder child setProperty child setProperty child setProperty child child setProperty child setProperty child setProperty child setProperty child getNodeState newTestInstance setPath query hasNext add getPath next sort assertEquals asList assertFalse hasNext assertFalse hasNext setPath query assertFalse hasNext assertFalse hasNext
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void traverse()
focal_class.file: oak-core/src/main/java/org/apache/jackrabbit/oak/query/index/TraversingIndex.java
focal_class.identifier: TraversingIndex
focal_class.interfaces: implements QueryIndex
focal_class.class_method_signature: TraversingIndex.getMinimumCost()
focal_class.full_signature: @Override public double getMinimumCost()
focal_class.identifier: getMinimumCost
focal_class.modifiers: @Override public
focal_class.parameters: ()
focal_class.return: double
focal_class.signature: double getMinimumCost()
focal_class.class_method_signature: TraversingIndex.query(Filter filter, NodeState rootState)
focal_class.full_signature: @Override public Cursor query(Filter filter, NodeState rootState)
focal_class.identifier: query
focal_class.modifiers: @Override public
focal_class.parameters: (Filter filter, NodeState rootState)
focal_class.return: Cursor
focal_class.signature: Cursor query(Filter filter, NodeState rootState)
focal_class.class_method_signature: TraversingIndex.isPotentiallySlow(Filter filter, NodeState rootState)
focal_class.full_signature: public boolean isPotentiallySlow(Filter filter, NodeState rootState)
focal_class.identifier: isPotentiallySlow
focal_class.modifiers: public
focal_class.parameters: (Filter filter, NodeState rootState)
focal_class.return: boolean
focal_class.signature: boolean isPotentiallySlow(Filter filter, NodeState rootState)
focal_class.class_method_signature: TraversingIndex.getCost(Filter filter, NodeState rootState)
focal_class.full_signature: @Override public double getCost(Filter filter, NodeState rootState)
focal_class.identifier: getCost
focal_class.modifiers: @Override public
focal_class.parameters: (Filter filter, NodeState rootState)
focal_class.return: double
focal_class.signature: double getCost(Filter filter, NodeState rootState)
focal_class.class_method_signature: TraversingIndex.getPlan(Filter filter, NodeState rootState)
focal_class.full_signature: @Override public String getPlan(Filter filter, NodeState rootState)
focal_class.identifier: getPlan
focal_class.modifiers: @Override public
focal_class.parameters: (Filter filter, NodeState rootState)
focal_class.return: String
focal_class.signature: String getPlan(Filter filter, NodeState rootState)
focal_class.class_method_signature: TraversingIndex.getIndexName()
focal_class.full_signature: @Override public String getIndexName()
focal_class.identifier: getIndexName
focal_class.modifiers: @Override public
focal_class.parameters: ()
focal_class.return: String
focal_class.signature: String getIndexName()
focal_method.body: @Override
      public Cursor query(Filter filter, NodeState rootState) {
          return Cursors.newTraversingCursor(filter, rootState);
      }
focal_method.class_method_signature: TraversingIndex.query(Filter filter, NodeState rootState)
focal_method.full_signature: @Override public Cursor query(Filter filter, NodeState rootState)
focal_method.identifier: query
focal_method.invocations: newTraversingCursor
focal_method.modifiers: @Override public
focal_method.parameters: (Filter filter, NodeState rootState)
focal_method.return: Cursor
focal_method.signature: Cursor query(Filter filter, NodeState rootState)