| <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> |
| <!-- NewPage --> |
| <html lang="en"> |
| <head> |
| <title>SymbolTable</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="SymbolTable"; |
| } |
| } |
| catch(err) { |
| } |
| //--> |
| var methods = {"i0":10,"i1":10,"i2":10,"i3":10,"i4":10,"i5":10}; |
| var tabs = {65535:["t0","All Methods"],2:["t2","Instance Methods"],8:["t4","Concrete 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> |
| <div class="subNav"> |
| <ul class="navList"> |
| <li><a href="../../../../org/apache/jasper/xmlparser/ParserUtils.html" title="class in org.apache.jasper.xmlparser"><span class="typeNameLink">Prev Class</span></a></li> |
| <li><a href="../../../../org/apache/jasper/xmlparser/SymbolTable.Entry.html" title="class in org.apache.jasper.xmlparser"><span class="typeNameLink">Next Class</span></a></li> |
| </ul> |
| <ul class="navList"> |
| <li><a href="../../../../index.html?org/apache/jasper/xmlparser/SymbolTable.html" target="_top">Frames</a></li> |
| <li><a href="SymbolTable.html" target="_top">No Frames</a></li> |
| </ul> |
| <ul class="navList" id="allclasses_navbar_top"> |
| <li><a href="../../../../allclasses-noframe.html">All 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: </li> |
| <li><a href="#nested.class.summary">Nested</a> | </li> |
| <li><a href="#field.summary">Field</a> | </li> |
| <li><a href="#constructor.summary">Constr</a> | </li> |
| <li><a href="#method.summary">Method</a></li> |
| </ul> |
| <ul class="subNavList"> |
| <li>Detail: </li> |
| <li><a href="#field.detail">Field</a> | </li> |
| <li><a href="#constructor.detail">Constr</a> | </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.jasper.xmlparser</div> |
| <h2 title="Class SymbolTable" class="title">Class SymbolTable</h2> |
| </div> |
| <div class="contentContainer"> |
| <ul class="inheritance"> |
| <li>java.lang.Object</li> |
| <li> |
| <ul class="inheritance"> |
| <li>org.apache.jasper.xmlparser.SymbolTable</li> |
| </ul> |
| </li> |
| </ul> |
| <div class="description"> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <hr> |
| <br> |
| <pre>public class <span class="typeNameLabel">SymbolTable</span> |
| extends java.lang.Object</pre> |
| <div class="block">This class is a symbol table implementation that guarantees that |
| strings used as identifiers are unique references. Multiple calls |
| to <code>addSymbol</code> will always return the same string |
| reference. |
| <p> |
| The symbol table performs the same task as <code>String.intern()</code> |
| with the following differences: |
| <ul> |
| <li> |
| A new string object does not need to be created in order to |
| retrieve a unique reference. Symbols can be added by using |
| a series of characters in a character array. |
| </li> |
| <li> |
| Users of the symbol table can provide their own symbol hashing |
| implementation. For example, a simple string hashing algorithm |
| may fail to produce a balanced set of hashcodes for symbols |
| that are <em>mostly</em> unique. Strings with similar leading |
| characters are especially prone to this poor hashing behavior. |
| </li> |
| </ul></div> |
| <dl> |
| <dt><span class="seeLabel">See Also:</span></dt> |
| <dd><code>SymbolHash</code></dd> |
| </dl> |
| </li> |
| </ul> |
| </div> |
| <div class="summary"> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <!-- ======== NESTED CLASS SUMMARY ======== --> |
| <ul class="blockList"> |
| <li class="blockList"><a name="nested.class.summary"> |
| <!-- --> |
| </a> |
| <h3>Nested Class Summary</h3> |
| <table class="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="Nested Class Summary table, listing nested classes, and an explanation"> |
| <caption><span>Nested Classes</span><span class="tabEnd"> </span></caption> |
| <tr> |
| <th class="colFirst" scope="col">Modifier and Type</th> |
| <th class="colLast" scope="col">Class and Description</th> |
| </tr> |
| <tr class="altColor"> |
| <td class="colFirst"><code>protected static class </code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/jasper/xmlparser/SymbolTable.Entry.html" title="class in org.apache.jasper.xmlparser">SymbolTable.Entry</a></span></code> |
| <div class="block">This class is a symbol table entry.</div> |
| </td> |
| </tr> |
| </table> |
| </li> |
| </ul> |
| <!-- =========== FIELD SUMMARY =========== --> |
| <ul class="blockList"> |
| <li class="blockList"><a name="field.summary"> |
| <!-- --> |
| </a> |
| <h3>Field Summary</h3> |
| <table class="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="Field Summary table, listing fields, and an explanation"> |
| <caption><span>Fields</span><span class="tabEnd"> </span></caption> |
| <tr> |
| <th class="colFirst" scope="col">Modifier and Type</th> |
| <th class="colLast" scope="col">Field and Description</th> |
| </tr> |
| <tr class="altColor"> |
| <td class="colFirst"><code>protected <a href="../../../../org/apache/jasper/xmlparser/SymbolTable.Entry.html" title="class in org.apache.jasper.xmlparser">SymbolTable.Entry</a>[]</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/jasper/xmlparser/SymbolTable.html#fBuckets">fBuckets</a></span></code> |
| <div class="block">Buckets.</div> |
| </td> |
| </tr> |
| <tr class="rowColor"> |
| <td class="colFirst"><code>protected int</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/jasper/xmlparser/SymbolTable.html#fTableSize">fTableSize</a></span></code> </td> |
| </tr> |
| <tr class="altColor"> |
| <td class="colFirst"><code>protected static int</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/jasper/xmlparser/SymbolTable.html#TABLE_SIZE">TABLE_SIZE</a></span></code> |
| <div class="block">Default table size.</div> |
| </td> |
| </tr> |
| </table> |
| </li> |
| </ul> |
| <!-- ======== CONSTRUCTOR SUMMARY ======== --> |
| <ul class="blockList"> |
| <li class="blockList"><a name="constructor.summary"> |
| <!-- --> |
| </a> |
| <h3>Constructor Summary</h3> |
| <table class="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="Constructor Summary table, listing constructors, and an explanation"> |
| <caption><span>Constructors</span><span class="tabEnd"> </span></caption> |
| <tr> |
| <th class="colOne" scope="col">Constructor and Description</th> |
| </tr> |
| <tr class="altColor"> |
| <td class="colOne"><code><span class="memberNameLink"><a href="../../../../org/apache/jasper/xmlparser/SymbolTable.html#SymbolTable--">SymbolTable</a></span>()</code> |
| <div class="block">Constructs a symbol table with a default number of buckets.</div> |
| </td> |
| </tr> |
| <tr class="rowColor"> |
| <td class="colOne"><code><span class="memberNameLink"><a href="../../../../org/apache/jasper/xmlparser/SymbolTable.html#SymbolTable-int-">SymbolTable</a></span>(int tableSize)</code> |
| <div class="block">Constructs a symbol table with a specified number of buckets.</div> |
| </td> |
| </tr> |
| </table> |
| </li> |
| </ul> |
| <!-- ========== 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"> </span></span><span id="t2" class="tableTab"><span><a href="javascript:show(2);">Instance Methods</a></span><span class="tabEnd"> </span></span><span id="t4" class="tableTab"><span><a href="javascript:show(8);">Concrete Methods</a></span><span class="tabEnd"> </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>java.lang.String</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/jasper/xmlparser/SymbolTable.html#addSymbol-char:A-int-int-">addSymbol</a></span>(char[] buffer, |
| int offset, |
| int length)</code> |
| <div class="block">Adds the specified symbol to the symbol table and returns a |
| reference to the unique symbol.</div> |
| </td> |
| </tr> |
| <tr id="i1" class="rowColor"> |
| <td class="colFirst"><code>java.lang.String</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/jasper/xmlparser/SymbolTable.html#addSymbol-java.lang.String-">addSymbol</a></span>(java.lang.String symbol)</code> |
| <div class="block">Adds the specified symbol to the symbol table and returns a |
| reference to the unique symbol.</div> |
| </td> |
| </tr> |
| <tr id="i2" class="altColor"> |
| <td class="colFirst"><code>boolean</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/jasper/xmlparser/SymbolTable.html#containsSymbol-char:A-int-int-">containsSymbol</a></span>(char[] buffer, |
| int offset, |
| int length)</code> |
| <div class="block">Returns true if the symbol table already contains the specified |
| symbol.</div> |
| </td> |
| </tr> |
| <tr id="i3" class="rowColor"> |
| <td class="colFirst"><code>boolean</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/jasper/xmlparser/SymbolTable.html#containsSymbol-java.lang.String-">containsSymbol</a></span>(java.lang.String symbol)</code> |
| <div class="block">Returns true if the symbol table already contains the specified |
| symbol.</div> |
| </td> |
| </tr> |
| <tr id="i4" class="altColor"> |
| <td class="colFirst"><code>int</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/jasper/xmlparser/SymbolTable.html#hash-char:A-int-int-">hash</a></span>(char[] buffer, |
| int offset, |
| int length)</code> |
| <div class="block">Returns a hashcode value for the specified symbol information.</div> |
| </td> |
| </tr> |
| <tr id="i5" class="rowColor"> |
| <td class="colFirst"><code>int</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/jasper/xmlparser/SymbolTable.html#hash-java.lang.String-">hash</a></span>(java.lang.String symbol)</code> |
| <div class="block">Returns a hashcode value for the specified symbol.</div> |
| </td> |
| </tr> |
| </table> |
| <ul class="blockList"> |
| <li class="blockList"><a name="methods.inherited.from.class.java.lang.Object"> |
| <!-- --> |
| </a> |
| <h3>Methods inherited from class java.lang.Object</h3> |
| <code>clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait</code></li> |
| </ul> |
| </li> |
| </ul> |
| </li> |
| </ul> |
| </div> |
| <div class="details"> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <!-- ============ FIELD DETAIL =========== --> |
| <ul class="blockList"> |
| <li class="blockList"><a name="field.detail"> |
| <!-- --> |
| </a> |
| <h3>Field Detail</h3> |
| <a name="TABLE_SIZE"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>TABLE_SIZE</h4> |
| <pre>protected static final int TABLE_SIZE</pre> |
| <div class="block">Default table size.</div> |
| <dl> |
| <dt><span class="seeLabel">See Also:</span></dt> |
| <dd><a href="../../../../constant-values.html#org.apache.jasper.xmlparser.SymbolTable.TABLE_SIZE">Constant Field Values</a></dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="fBuckets"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>fBuckets</h4> |
| <pre>protected <a href="../../../../org/apache/jasper/xmlparser/SymbolTable.Entry.html" title="class in org.apache.jasper.xmlparser">SymbolTable.Entry</a>[] fBuckets</pre> |
| <div class="block">Buckets.</div> |
| </li> |
| </ul> |
| <a name="fTableSize"> |
| <!-- --> |
| </a> |
| <ul class="blockListLast"> |
| <li class="blockList"> |
| <h4>fTableSize</h4> |
| <pre>protected int fTableSize</pre> |
| </li> |
| </ul> |
| </li> |
| </ul> |
| <!-- ========= CONSTRUCTOR DETAIL ======== --> |
| <ul class="blockList"> |
| <li class="blockList"><a name="constructor.detail"> |
| <!-- --> |
| </a> |
| <h3>Constructor Detail</h3> |
| <a name="SymbolTable--"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>SymbolTable</h4> |
| <pre>public SymbolTable()</pre> |
| <div class="block">Constructs a symbol table with a default number of buckets.</div> |
| </li> |
| </ul> |
| <a name="SymbolTable-int-"> |
| <!-- --> |
| </a> |
| <ul class="blockListLast"> |
| <li class="blockList"> |
| <h4>SymbolTable</h4> |
| <pre>public SymbolTable(int tableSize)</pre> |
| <div class="block">Constructs a symbol table with a specified number of buckets.</div> |
| </li> |
| </ul> |
| </li> |
| </ul> |
| <!-- ============ METHOD DETAIL ========== --> |
| <ul class="blockList"> |
| <li class="blockList"><a name="method.detail"> |
| <!-- --> |
| </a> |
| <h3>Method Detail</h3> |
| <a name="addSymbol-java.lang.String-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>addSymbol</h4> |
| <pre>public java.lang.String addSymbol(java.lang.String symbol)</pre> |
| <div class="block">Adds the specified symbol to the symbol table and returns a |
| reference to the unique symbol. If the symbol already exists, |
| the previous symbol reference is returned instead, in order |
| guarantee that symbol references remain unique.</div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>symbol</code> - The new symbol.</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="addSymbol-char:A-int-int-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>addSymbol</h4> |
| <pre>public java.lang.String addSymbol(char[] buffer, |
| int offset, |
| int length)</pre> |
| <div class="block">Adds the specified symbol to the symbol table and returns a |
| reference to the unique symbol. If the symbol already exists, |
| the previous symbol reference is returned instead, in order |
| guarantee that symbol references remain unique.</div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>buffer</code> - The buffer containing the new symbol.</dd> |
| <dd><code>offset</code> - The offset into the buffer of the new symbol.</dd> |
| <dd><code>length</code> - The length of the new symbol in the buffer.</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="hash-java.lang.String-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>hash</h4> |
| <pre>public int hash(java.lang.String symbol)</pre> |
| <div class="block">Returns a hashcode value for the specified symbol. The value |
| returned by this method must be identical to the value returned |
| by the <code>hash(char[],int,int)</code> method when called |
| with the character array that comprises the symbol string.</div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>symbol</code> - The symbol to hash.</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="hash-char:A-int-int-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>hash</h4> |
| <pre>public int hash(char[] buffer, |
| int offset, |
| int length)</pre> |
| <div class="block">Returns a hashcode value for the specified symbol information. |
| The value returned by this method must be identical to the value |
| returned by the <code>hash(String)</code> method when called |
| with the string object created from the symbol information.</div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>buffer</code> - The character buffer containing the symbol.</dd> |
| <dd><code>offset</code> - The offset into the character buffer of the start |
| of the symbol.</dd> |
| <dd><code>length</code> - The length of the symbol.</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="containsSymbol-java.lang.String-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>containsSymbol</h4> |
| <pre>public boolean containsSymbol(java.lang.String symbol)</pre> |
| <div class="block">Returns true if the symbol table already contains the specified |
| symbol.</div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>symbol</code> - The symbol to look for.</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="containsSymbol-char:A-int-int-"> |
| <!-- --> |
| </a> |
| <ul class="blockListLast"> |
| <li class="blockList"> |
| <h4>containsSymbol</h4> |
| <pre>public boolean containsSymbol(char[] buffer, |
| int offset, |
| int length)</pre> |
| <div class="block">Returns true if the symbol table already contains the specified |
| symbol.</div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>buffer</code> - The buffer containing the symbol to look for.</dd> |
| <dd><code>offset</code> - The offset into the buffer.</dd> |
| <dd><code>length</code> - The length of the symbol in the buffer.</dd> |
| </dl> |
| </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> |
| <div class="subNav"> |
| <ul class="navList"> |
| <li><a href="../../../../org/apache/jasper/xmlparser/ParserUtils.html" title="class in org.apache.jasper.xmlparser"><span class="typeNameLink">Prev Class</span></a></li> |
| <li><a href="../../../../org/apache/jasper/xmlparser/SymbolTable.Entry.html" title="class in org.apache.jasper.xmlparser"><span class="typeNameLink">Next Class</span></a></li> |
| </ul> |
| <ul class="navList"> |
| <li><a href="../../../../index.html?org/apache/jasper/xmlparser/SymbolTable.html" target="_top">Frames</a></li> |
| <li><a href="SymbolTable.html" target="_top">No Frames</a></li> |
| </ul> |
| <ul class="navList" id="allclasses_navbar_bottom"> |
| <li><a href="../../../../allclasses-noframe.html">All 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: </li> |
| <li><a href="#nested.class.summary">Nested</a> | </li> |
| <li><a href="#field.summary">Field</a> | </li> |
| <li><a href="#constructor.summary">Constr</a> | </li> |
| <li><a href="#method.summary">Method</a></li> |
| </ul> |
| <ul class="subNavList"> |
| <li>Detail: </li> |
| <li><a href="#field.detail">Field</a> | </li> |
| <li><a href="#constructor.detail">Constr</a> | </li> |
| <li><a href="#method.detail">Method</a></li> |
| </ul> |
| </div> |
| <a name="skip.navbar.bottom"> |
| <!-- --> |
| </a></div> |
| <!-- ======== END OF BOTTOM NAVBAR ======= --> |
| </body> |
| </html> |