HashTreeTraverser.html 14.1 KB
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<!-- NewPage -->
<html lang="en">
<head>
<!-- Generated by javadoc -->
<title>HashTreeTraverser (Apache JMeter API)</title>
<link rel="stylesheet" type="text/css" href="../../../../stylesheet.css" title="Style">
<script type="text/javascript" src="../../../../script.js"></script>
</head>
<body>
<script type="text/javascript"><!--
    try {
        if (location.href.indexOf('is-external=true') == -1) {
            parent.document.title="HashTreeTraverser (Apache JMeter API)";
        }
    }
    catch(err) {
    }
//-->
var methods = {"i0":6,"i1":6,"i2":6};
var tabs = {65535:["t0","All Methods"],2:["t2","Instance Methods"],4:["t3","Abstract Methods"]};
var altColor = "altColor";
var rowColor = "rowColor";
var tableTab = "tableTab";
var activeTableTab = "activeTableTab";
</script>
<noscript>
<div>JavaScript is disabled on your browser.</div>
</noscript>
<!-- ========= START OF TOP NAVBAR ======= -->
<div class="topNav"><a name="navbar.top">
<!--   -->
</a>
<div class="skipNav"><a href="#skip.navbar.top" title="Skip navigation links">Skip navigation links</a></div>
<a name="navbar.top.firstrow">
<!--   -->
</a>
<ul class="navList" title="Navigation">
<li><a href="../../../../overview-summary.html">Overview</a></li>
<li><a href="package-summary.html">Package</a></li>
<li class="navBarCell1Rev">Class</li>
<li><a href="package-tree.html">Tree</a></li>
<li><a href="../../../../deprecated-list.html">Deprecated</a></li>
<li><a href="../../../../index-all.html">Index</a></li>
<li><a href="../../../../help-doc.html">Help</a></li>
</ul>
<div class="aboutLanguage"><b>Apache JMeter</b></div>
</div>
<div class="subNav">
<ul class="navList">
<li><a href="../../../../org/apache/jorphan/collections/HashTree.html" title="class in org.apache.jorphan.collections"><span class="typeNameLink">Prev&nbsp;Class</span></a></li>
<li><a href="../../../../org/apache/jorphan/collections/ListedHashTree.html" title="class in org.apache.jorphan.collections"><span class="typeNameLink">Next&nbsp;Class</span></a></li>
</ul>
<ul class="navList">
<li><a href="../../../../index.html?org/apache/jorphan/collections/HashTreeTraverser.html" target="_top">Frames</a></li>
<li><a href="HashTreeTraverser.html" target="_top">No&nbsp;Frames</a></li>
</ul>
<ul class="navList" id="allclasses_navbar_top">
<li><a href="../../../../allclasses-noframe.html">All&nbsp;Classes</a></li>
</ul>
<div>
<script type="text/javascript"><!--
  allClassesLink = document.getElementById("allclasses_navbar_top");
  if(window==top) {
    allClassesLink.style.display = "block";
  }
  else {
    allClassesLink.style.display = "none";
  }
  //-->
</script>
</div>
<div>
<ul class="subNavList">
<li>Summary:&nbsp;</li>
<li>Nested&nbsp;|&nbsp;</li>
<li>Field&nbsp;|&nbsp;</li>
<li>Constr&nbsp;|&nbsp;</li>
<li><a href="#method.summary">Method</a></li>
</ul>
<ul class="subNavList">
<li>Detail:&nbsp;</li>
<li>Field&nbsp;|&nbsp;</li>
<li>Constr&nbsp;|&nbsp;</li>
<li><a href="#method.detail">Method</a></li>
</ul>
</div>
<a name="skip.navbar.top">
<!--   -->
</a></div>
<!-- ========= END OF TOP NAVBAR ========= -->
<!-- ======== START OF CLASS DATA ======== -->
<div class="header">
<div class="subTitle">org.apache.jorphan.collections</div>
<h2 title="Interface HashTreeTraverser" class="title">Interface HashTreeTraverser</h2>
</div>
<div class="contentContainer">
<div class="description">
<ul class="blockList">
<li class="blockList">
<dl>
<dt>All Known Implementing Classes:</dt>
<dd><a href="../../../../org/apache/jmeter/gui/action/CheckDirty.html" title="class in org.apache.jmeter.gui.action">CheckDirty</a>, <a href="../../../../org/apache/jmeter/validation/ComponentTreeClonerForValidation.html" title="class in org.apache.jmeter.validation">ComponentTreeClonerForValidation</a>, <a href="../../../../org/apache/jmeter/engine/ConvertListeners.html" title="class in org.apache.jmeter.engine">ConvertListeners</a>, <a href="../../../../org/apache/jmeter/threads/FindTestElementsUpToRootTraverser.html" title="class in org.apache.jmeter.threads">FindTestElementsUpToRootTraverser</a>, <a href="../../../../org/apache/jmeter/engine/PreCompiler.html" title="class in org.apache.jmeter.engine">PreCompiler</a>, <a href="../../../../org/apache/jorphan/collections/SearchByClass.html" title="class in org.apache.jorphan.collections">SearchByClass</a>, <a href="../../../../org/apache/jmeter/threads/TestCompiler.html" title="class in org.apache.jmeter.threads">TestCompiler</a>, <a href="../../../../org/apache/jmeter/engine/TreeCloner.html" title="class in org.apache.jmeter.engine">TreeCloner</a>, <a href="../../../../org/apache/jmeter/gui/action/validation/TreeClonerForValidation.html" title="class in org.apache.jmeter.gui.action.validation">TreeClonerForValidation</a>, <a href="../../../../org/apache/jmeter/engine/TreeClonerNoTimer.html" title="class in org.apache.jmeter.engine">TreeClonerNoTimer</a>, <a href="../../../../org/apache/jmeter/engine/TurnElementsOn.html" title="class in org.apache.jmeter.engine">TurnElementsOn</a></dd>
</dl>
<hr>
<br>
<pre>public interface <span class="typeNameLabel">HashTreeTraverser</span></pre>
<div class="block">By implementing this interface, a class can easily traverse a HashTree
 object, and be notified via callbacks of certain events. There are three such
 events:
 <ol>
 <li>When a node is first encountered, the traverser's
 <a href="../../../../org/apache/jorphan/collections/HashTreeTraverser.html#addNode-java.lang.Object-org.apache.jorphan.collections.HashTree-"><code>addNode(Object,HashTree)</code></a> method is called. It is handed the object
 at that node, and the entire sub-tree of the node.</li>
 <li>When a leaf node is encountered, the traverser is notified that a full
 path has been finished via the <a href="../../../../org/apache/jorphan/collections/HashTreeTraverser.html#processPath--"><code>processPath()</code></a> method. It is the
 traversing class's responsibility to know the path that has just finished
 (this can be done by keeping a simple stack of all added nodes).</li>
 <li>When a node is retraced, the traverser's <a href="../../../../org/apache/jorphan/collections/HashTreeTraverser.html#subtractNode--"><code>subtractNode()</code></a> is
 called. Again, it is the traverser's responsibility to know which node has
 been retraced.</li>
 </ol>
 To summarize, as the traversal goes down a tree path, nodes are added. When
 the end of the path is reached, the <a href="../../../../org/apache/jorphan/collections/HashTreeTraverser.html#processPath--"><code>processPath()</code></a> call is sent. As
 the traversal backs up, nodes are subtracted.
 <p>
 The traversal is a depth-first traversal.</div>
<dl>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../../../org/apache/jorphan/collections/HashTree.html" title="class in org.apache.jorphan.collections"><code>HashTree</code></a>, 
<a href="../../../../org/apache/jorphan/collections/SearchByClass.html" title="class in org.apache.jorphan.collections"><code>SearchByClass</code></a></dd>
</dl>
</li>
</ul>
</div>
<div class="summary">
<ul class="blockList">
<li class="blockList">
<!-- ========== METHOD SUMMARY =========== -->
<ul class="blockList">
<li class="blockList"><a name="method.summary">
<!--   -->
</a>
<h3>Method Summary</h3>
<table class="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="Method Summary table, listing methods, and an explanation">
<caption><span id="t0" class="activeTableTab"><span>All Methods</span><span class="tabEnd">&nbsp;</span></span><span id="t2" class="tableTab"><span><a href="javascript:show(2);">Instance Methods</a></span><span class="tabEnd">&nbsp;</span></span><span id="t3" class="tableTab"><span><a href="javascript:show(4);">Abstract Methods</a></span><span class="tabEnd">&nbsp;</span></span></caption>
<tr>
<th class="colFirst" scope="col">Modifier and Type</th>
<th class="colLast" scope="col">Method and Description</th>
</tr>
<tr id="i0" class="altColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/jorphan/collections/HashTreeTraverser.html#addNode-java.lang.Object-org.apache.jorphan.collections.HashTree-">addNode</a></span>(<a href="http://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a>&nbsp;node,
       <a href="../../../../org/apache/jorphan/collections/HashTree.html" title="class in org.apache.jorphan.collections">HashTree</a>&nbsp;subTree)</code>
<div class="block">The tree traverses itself depth-first, calling addNode for each object it
 encounters as it goes.</div>
</td>
</tr>
<tr id="i1" class="rowColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/jorphan/collections/HashTreeTraverser.html#processPath--">processPath</a></span>()</code>
<div class="block">Process path is called when a leaf is reached.</div>
</td>
</tr>
<tr id="i2" class="altColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/jorphan/collections/HashTreeTraverser.html#subtractNode--">subtractNode</a></span>()</code>
<div class="block">Indicates traversal has moved up a step, and the visitor should remove
 the top node from its stack structure.</div>
</td>
</tr>
</table>
</li>
</ul>
</li>
</ul>
</div>
<div class="details">
<ul class="blockList">
<li class="blockList">
<!-- ============ METHOD DETAIL ========== -->
<ul class="blockList">
<li class="blockList"><a name="method.detail">
<!--   -->
</a>
<h3>Method Detail</h3>
<a name="addNode-java.lang.Object-org.apache.jorphan.collections.HashTree-">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>addNode</h4>
<pre>void&nbsp;addNode(<a href="http://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a>&nbsp;node,
             <a href="../../../../org/apache/jorphan/collections/HashTree.html" title="class in org.apache.jorphan.collections">HashTree</a>&nbsp;subTree)</pre>
<div class="block">The tree traverses itself depth-first, calling addNode for each object it
 encounters as it goes. This is a callback method, and should not be
 called except by a HashTree during traversal.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>node</code> - the node currently encountered</dd>
<dd><code>subTree</code> - the HashTree under the node encountered</dd>
</dl>
</li>
</ul>
<a name="subtractNode--">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>subtractNode</h4>
<pre>void&nbsp;subtractNode()</pre>
<div class="block">Indicates traversal has moved up a step, and the visitor should remove
 the top node from its stack structure. This is a callback method, and
 should not be called except by a HashTree during traversal.</div>
</li>
</ul>
<a name="processPath--">
<!--   -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>processPath</h4>
<pre>void&nbsp;processPath()</pre>
<div class="block">Process path is called when a leaf is reached. If a visitor wishes to
 generate Lists of path elements to each leaf, it should keep a Stack data
 structure of nodes passed to it with addNode, and removing top items for
 every <a href="../../../../org/apache/jorphan/collections/HashTreeTraverser.html#subtractNode--"><code>subtractNode()</code></a> call. This is a callback method, and should
 not be called except by a HashTree during traversal.</div>
</li>
</ul>
</li>
</ul>
</li>
</ul>
</div>
</div>
<!-- ========= END OF CLASS DATA ========= -->
<!-- ======= START OF BOTTOM NAVBAR ====== -->
<div class="bottomNav"><a name="navbar.bottom">
<!--   -->
</a>
<div class="skipNav"><a href="#skip.navbar.bottom" title="Skip navigation links">Skip navigation links</a></div>
<a name="navbar.bottom.firstrow">
<!--   -->
</a>
<ul class="navList" title="Navigation">
<li><a href="../../../../overview-summary.html">Overview</a></li>
<li><a href="package-summary.html">Package</a></li>
<li class="navBarCell1Rev">Class</li>
<li><a href="package-tree.html">Tree</a></li>
<li><a href="../../../../deprecated-list.html">Deprecated</a></li>
<li><a href="../../../../index-all.html">Index</a></li>
<li><a href="../../../../help-doc.html">Help</a></li>
</ul>
<div class="aboutLanguage"><b>Apache JMeter</b></div>
</div>
<div class="subNav">
<ul class="navList">
<li><a href="../../../../org/apache/jorphan/collections/HashTree.html" title="class in org.apache.jorphan.collections"><span class="typeNameLink">Prev&nbsp;Class</span></a></li>
<li><a href="../../../../org/apache/jorphan/collections/ListedHashTree.html" title="class in org.apache.jorphan.collections"><span class="typeNameLink">Next&nbsp;Class</span></a></li>
</ul>
<ul class="navList">
<li><a href="../../../../index.html?org/apache/jorphan/collections/HashTreeTraverser.html" target="_top">Frames</a></li>
<li><a href="HashTreeTraverser.html" target="_top">No&nbsp;Frames</a></li>
</ul>
<ul class="navList" id="allclasses_navbar_bottom">
<li><a href="../../../../allclasses-noframe.html">All&nbsp;Classes</a></li>
</ul>
<div>
<script type="text/javascript"><!--
  allClassesLink = document.getElementById("allclasses_navbar_bottom");
  if(window==top) {
    allClassesLink.style.display = "block";
  }
  else {
    allClassesLink.style.display = "none";
  }
  //-->
</script>
</div>
<div>
<ul class="subNavList">
<li>Summary:&nbsp;</li>
<li>Nested&nbsp;|&nbsp;</li>
<li>Field&nbsp;|&nbsp;</li>
<li>Constr&nbsp;|&nbsp;</li>
<li><a href="#method.summary">Method</a></li>
</ul>
<ul class="subNavList">
<li>Detail:&nbsp;</li>
<li>Field&nbsp;|&nbsp;</li>
<li>Constr&nbsp;|&nbsp;</li>
<li><a href="#method.detail">Method</a></li>
</ul>
</div>
<a name="skip.navbar.bottom">
<!--   -->
</a></div>
<!-- ======== END OF BOTTOM NAVBAR ======= -->
<p class="legalCopy"><small>Copyright &#xA9; 1998-2017 Apache Software Foundation. All Rights Reserved.</small></p>
</body>
</html>