<!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 (version 1.7.0_10-ea) on Sun Jul 14 20:03:24 PDT 2013 -->
<title>CharsToNameCanonicalizer (Jackson JSON Processor)</title>
<meta name="date" content="2013-07-14">
<link rel="stylesheet" type="text/css" href="../../../../stylesheet.css" title="Style">
</head>
<body>
<script type="text/javascript"><!--
    if (location.href.indexOf('is-external=true') == -1) {
        parent.document.title="CharsToNameCanonicalizer (Jackson JSON Processor)";
    }
//-->
</script>
<noscript>
<div>JavaScript is disabled on your browser.</div>
</noscript>
<!-- ========= START OF TOP NAVBAR ======= -->
<div class="topNav"><a name="navbar_top">
<!--   -->
</a><a href="#skip-navbar_top" title="Skip navigation links"></a><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="class-use/CharsToNameCanonicalizer.html">Use</a></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/codehaus/jackson/sym/BytesToNameCanonicalizer.html" title="class in org.codehaus.jackson.sym"><span class="strong">Prev Class</span></a></li>
<li><a href="../../../../org/codehaus/jackson/sym/Name.html" title="class in org.codehaus.jackson.sym"><span class="strong">Next Class</span></a></li>
</ul>
<ul class="navList">
<li><a href="../../../../index.html?org/codehaus/jackson/sym/CharsToNameCanonicalizer.html" target="_top">Frames</a></li>
<li><a href="CharsToNameCanonicalizer.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:&nbsp;</li>
<li>Nested&nbsp;|&nbsp;</li>
<li><a href="#field_summary">Field</a>&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><a href="#field_detail">Field</a>&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.codehaus.jackson.sym</div>
<h2 title="Class CharsToNameCanonicalizer" class="title">Class CharsToNameCanonicalizer</h2>
</div>
<div class="contentContainer">
<ul class="inheritance">
<li><a href="http://docs.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">java.lang.Object</a></li>
<li>
<ul class="inheritance">
<li>org.codehaus.jackson.sym.CharsToNameCanonicalizer</li>
</ul>
</li>
</ul>
<div class="description">
<ul class="blockList">
<li class="blockList">
<hr>
<br>
<pre>public final class <span class="strong">CharsToNameCanonicalizer</span>
extends <a href="http://docs.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a></pre>
<div class="block">This class is a kind of specialized type-safe Map, from char array to
 String value. Specialization means that in addition to type-safety
 and specific access patterns (key char array, Value optionally interned
 String; values added on access if necessary), and that instances are
 meant to be used concurrently, but by using well-defined mechanisms
 to obtain such concurrently usable instances. Main use for the class
 is to store symbol table information for things like compilers and
 parsers; especially when number of symbols (keywords) is limited.
<p>
 For optimal performance, usage pattern should be one where matches
 should be very common (especially after "warm-up"), and as with most hash-based
 maps/sets, that hash codes are uniformly distributed. Also, collisions
 are slightly more expensive than with HashMap or HashSet, since hash codes
 are not used in resolving collisions; that is, equals() comparison is
 done with all symbols in same bucket index.<br />
 Finally, rehashing is also more expensive, as hash codes are not
 stored; rehashing requires all entries' hash codes to be recalculated.
 Reason for not storing hash codes is reduced memory usage, hoping
 for better memory locality.
<p>
 Usual usage pattern is to create a single "master" instance, and either
 use that instance in sequential fashion, or to create derived "child"
 instances, which after use, are asked to return possible symbol additions
 to master instance. In either case benefit is that symbol table gets
 initialized so that further uses are more efficient, as eventually all
 symbols needed will already be in symbol table. At that point no more
 Symbol String allocations are needed, nor changes to symbol table itself.
<p>
 Note that while individual SymbolTable instances are NOT thread-safe
 (much like generic collection classes), concurrently used "child"
 instances can be freely used without synchronization. However, using
 master table concurrently with child instances can only be done if
 access to master instance is read-only (i.e. no modifications done).</div>
</li>
</ul>
</div>
<div class="summary">
<ul class="blockList">
<li class="blockList">
<!-- =========== FIELD SUMMARY =========== -->
<ul class="blockList">
<li class="blockList"><a name="field_summary">
<!--   -->
</a>
<h3>Field Summary</h3>
<table class="overviewSummary" border="0" cellpadding="3" cellspacing="0" summary="Field Summary table, listing fields, and an explanation">
<caption><span>Fields</span><span class="tabEnd">&nbsp;</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 org.codehaus.jackson.sym.CharsToNameCanonicalizer.Bucket[]</code></td>
<td class="colLast"><code><strong><a href="../../../../org/codehaus/jackson/sym/CharsToNameCanonicalizer.html#_buckets">_buckets</a></strong></code>
<div class="block">Overflow buckets; if primary doesn't match, lookup is done
 from here.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>protected boolean</code></td>
<td class="colLast"><code><strong><a href="../../../../org/codehaus/jackson/sym/CharsToNameCanonicalizer.html#_canonicalize">_canonicalize</a></strong></code>
<div class="block">Whether any canonicalization should be attempted (whether using
 intern or not)</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>protected boolean</code></td>
<td class="colLast"><code><strong><a href="../../../../org/codehaus/jackson/sym/CharsToNameCanonicalizer.html#_dirty">_dirty</a></strong></code>
<div class="block">Flag that indicates if any changes have been made to the data;
 used to both determine if bucket array needs to be copied when
 (first) change is made, and potentially if updated bucket list
 is to be resync'ed back to master instance.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>protected int</code></td>
<td class="colLast"><code><strong><a href="../../../../org/codehaus/jackson/sym/CharsToNameCanonicalizer.html#_indexMask">_indexMask</a></strong></code>
<div class="block">Mask used to get index from hash values; equal to
 <code>_buckets.length - 1</code>, when _buckets.length is
 a power of two.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>protected boolean</code></td>
<td class="colLast"><code><strong><a href="../../../../org/codehaus/jackson/sym/CharsToNameCanonicalizer.html#_intern">_intern</a></strong></code>
<div class="block">Whether canonical symbol Strings are to be intern()ed before added
 to the table or not</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>protected int</code></td>
<td class="colLast"><code><strong><a href="../../../../org/codehaus/jackson/sym/CharsToNameCanonicalizer.html#_longestCollisionList">_longestCollisionList</a></strong></code>
<div class="block">We need to keep track of the longest collision list; this is needed
 both to indicate problems with attacks and to allow flushing for
 other cases.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>protected <a href="../../../../org/codehaus/jackson/sym/CharsToNameCanonicalizer.html" title="class in org.codehaus.jackson.sym">CharsToNameCanonicalizer</a></code></td>
<td class="colLast"><code><strong><a href="../../../../org/codehaus/jackson/sym/CharsToNameCanonicalizer.html#_parent">_parent</a></strong></code>
<div class="block">Sharing of learnt symbols is done by optional linking of symbol
 table instances with their parents.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>protected int</code></td>
<td class="colLast"><code><strong><a href="../../../../org/codehaus/jackson/sym/CharsToNameCanonicalizer.html#_size">_size</a></strong></code>
<div class="block">Current size (number of entries); needed to know if and when
 rehash.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>protected int</code></td>
<td class="colLast"><code><strong><a href="../../../../org/codehaus/jackson/sym/CharsToNameCanonicalizer.html#_sizeThreshold">_sizeThreshold</a></strong></code>
<div class="block">Limit that indicates maximum size this instance can hold before
 it needs to be expanded and rehashed.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>protected <a href="http://docs.oracle.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>[]</code></td>
<td class="colLast"><code><strong><a href="../../../../org/codehaus/jackson/sym/CharsToNameCanonicalizer.html#_symbols">_symbols</a></strong></code>
<div class="block">Primary matching symbols; it's expected most match occur from
 here.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>protected static int</code></td>
<td class="colLast"><code><strong><a href="../../../../org/codehaus/jackson/sym/CharsToNameCanonicalizer.html#DEFAULT_TABLE_SIZE">DEFAULT_TABLE_SIZE</a></strong></code>
<div class="block">Default initial table size.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>static int</code></td>
<td class="colLast"><code><strong><a href="../../../../org/codehaus/jackson/sym/CharsToNameCanonicalizer.html#HASH_MULT">HASH_MULT</a></strong></code>&nbsp;</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>protected static int</code></td>
<td class="colLast"><code><strong><a href="../../../../org/codehaus/jackson/sym/CharsToNameCanonicalizer.html#MAX_TABLE_SIZE">MAX_TABLE_SIZE</a></strong></code>
<div class="block">Let's not expand symbol tables past some maximum size;
 this should protected against OOMEs caused by large documents
 with uniquer (~= random) names.</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="overviewSummary" border="0" cellpadding="3" cellspacing="0" summary="Method Summary table, listing methods, and an explanation">
<caption><span>Methods</span><span class="tabEnd">&nbsp;</span></caption>
<tr>
<th class="colFirst" scope="col">Modifier and Type</th>
<th class="colLast" scope="col">Method and Description</th>
</tr>
<tr class="altColor">
<td class="colFirst"><code>int</code></td>
<td class="colLast"><code><strong><a href="../../../../org/codehaus/jackson/sym/CharsToNameCanonicalizer.html#_hashToIndex(int)">_hashToIndex</a></strong>(int&nbsp;rawHash)</code>
<div class="block">Helper method that takes in a "raw" hash value, shuffles it as necessary,
 and truncates to be used as the index.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>int</code></td>
<td class="colLast"><code><strong><a href="../../../../org/codehaus/jackson/sym/CharsToNameCanonicalizer.html#bucketCount()">bucketCount</a></strong>()</code>
<div class="block">Method for checking number of primary hash buckets this symbol
 table uses.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>int</code></td>
<td class="colLast"><code><strong><a href="../../../../org/codehaus/jackson/sym/CharsToNameCanonicalizer.html#calcHash(char[], int, int)">calcHash</a></strong>(char[]&nbsp;buffer,
        int&nbsp;start,
        int&nbsp;len)</code>
<div class="block">Implementation of a hashing method for variable length
 Strings.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>int</code></td>
<td class="colLast"><code><strong><a href="../../../../org/codehaus/jackson/sym/CharsToNameCanonicalizer.html#calcHash(java.lang.String)">calcHash</a></strong>(<a href="http://docs.oracle.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;key)</code>&nbsp;</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>int</code></td>
<td class="colLast"><code><strong><a href="../../../../org/codehaus/jackson/sym/CharsToNameCanonicalizer.html#collisionCount()">collisionCount</a></strong>()</code>
<div class="block">Method mostly needed by unit tests; calculates number of
 entries that are in collision list.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>static <a href="../../../../org/codehaus/jackson/sym/CharsToNameCanonicalizer.html" title="class in org.codehaus.jackson.sym">CharsToNameCanonicalizer</a></code></td>
<td class="colLast"><code><strong><a href="../../../../org/codehaus/jackson/sym/CharsToNameCanonicalizer.html#createRoot()">createRoot</a></strong>()</code>
<div class="block">Method called to create root canonicalizer for a <a href="../../../../org/codehaus/jackson/JsonFactory.html" title="class in org.codehaus.jackson"><code>JsonFactory</code></a>
 instance.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>protected static <a href="../../../../org/codehaus/jackson/sym/CharsToNameCanonicalizer.html" title="class in org.codehaus.jackson.sym">CharsToNameCanonicalizer</a></code></td>
<td class="colLast"><code><strong><a href="../../../../org/codehaus/jackson/sym/CharsToNameCanonicalizer.html#createRoot(int)">createRoot</a></strong>(int&nbsp;hashSeed)</code>&nbsp;</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code><a href="http://docs.oracle.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td>
<td class="colLast"><code><strong><a href="../../../../org/codehaus/jackson/sym/CharsToNameCanonicalizer.html#findSymbol(char[], int, int, int)">findSymbol</a></strong>(char[]&nbsp;buffer,
          int&nbsp;start,
          int&nbsp;len,
          int&nbsp;h)</code>&nbsp;</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>int</code></td>
<td class="colLast"><code><strong><a href="../../../../org/codehaus/jackson/sym/CharsToNameCanonicalizer.html#hashSeed()">hashSeed</a></strong>()</code>&nbsp;</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code><a href="../../../../org/codehaus/jackson/sym/CharsToNameCanonicalizer.html" title="class in org.codehaus.jackson.sym">CharsToNameCanonicalizer</a></code></td>
<td class="colLast"><code><strong><a href="../../../../org/codehaus/jackson/sym/CharsToNameCanonicalizer.html#makeChild(boolean, boolean)">makeChild</a></strong>(boolean&nbsp;canonicalize,
         boolean&nbsp;intern)</code>
<div class="block">"Factory" method; will create a new child instance of this symbol
 table.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>int</code></td>
<td class="colLast"><code><strong><a href="../../../../org/codehaus/jackson/sym/CharsToNameCanonicalizer.html#maxCollisionLength()">maxCollisionLength</a></strong>()</code>
<div class="block">Method mostly needed by unit tests; calculates length of the
 longest collision chain.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>boolean</code></td>
<td class="colLast"><code><strong><a href="../../../../org/codehaus/jackson/sym/CharsToNameCanonicalizer.html#maybeDirty()">maybeDirty</a></strong>()</code>&nbsp;</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><strong><a href="../../../../org/codehaus/jackson/sym/CharsToNameCanonicalizer.html#release()">release</a></strong>()</code>&nbsp;</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>protected void</code></td>
<td class="colLast"><code><strong><a href="../../../../org/codehaus/jackson/sym/CharsToNameCanonicalizer.html#reportTooManyCollisions(int)">reportTooManyCollisions</a></strong>(int&nbsp;maxLen)</code>&nbsp;</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>int</code></td>
<td class="colLast"><code><strong><a href="../../../../org/codehaus/jackson/sym/CharsToNameCanonicalizer.html#size()">size</a></strong>()</code>&nbsp;</td>
</tr>
</table>
<ul class="blockList">
<li class="blockList"><a name="methods_inherited_from_class_java.lang.Object">
<!--   -->
</a>
<h3>Methods inherited from class&nbsp;java.lang.<a href="http://docs.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a></h3>
<code><a href="http://docs.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true#clone()" title="class or interface in java.lang">clone</a>, <a href="http://docs.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true#equals(java.lang.Object)" title="class or interface in java.lang">equals</a>, <a href="http://docs.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true#finalize()" title="class or interface in java.lang">finalize</a>, <a href="http://docs.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true#getClass()" title="class or interface in java.lang">getClass</a>, <a href="http://docs.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true#hashCode()" title="class or interface in java.lang">hashCode</a>, <a href="http://docs.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true#notify()" title="class or interface in java.lang">notify</a>, <a href="http://docs.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true#notifyAll()" title="class or interface in java.lang">notifyAll</a>, <a href="http://docs.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true#toString()" title="class or interface in java.lang">toString</a>, <a href="http://docs.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true#wait()" title="class or interface in java.lang">wait</a>, <a href="http://docs.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true#wait(long)" title="class or interface in java.lang">wait</a>, <a href="http://docs.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true#wait(long, int)" title="class or interface in java.lang">wait</a></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="HASH_MULT">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>HASH_MULT</h4>
<pre>public static final&nbsp;int HASH_MULT</pre>
<dl><dt><span class="strong">See Also:</span></dt><dd><a href="../../../../constant-values.html#org.codehaus.jackson.sym.CharsToNameCanonicalizer.HASH_MULT">Constant Field Values</a></dd></dl>
</li>
</ul>
<a name="DEFAULT_TABLE_SIZE">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>DEFAULT_TABLE_SIZE</h4>
<pre>protected static final&nbsp;int DEFAULT_TABLE_SIZE</pre>
<div class="block">Default initial table size. Shouldn't be miniscule (as there's
 cost to both array realloc and rehashing), but let's keep
 it reasonably small nonetheless. For systems that properly 
 reuse factories it doesn't matter either way; but when
 recreating factories often, initial overhead may dominate.</div>
<dl><dt><span class="strong">See Also:</span></dt><dd><a href="../../../../constant-values.html#org.codehaus.jackson.sym.CharsToNameCanonicalizer.DEFAULT_TABLE_SIZE">Constant Field Values</a></dd></dl>
</li>
</ul>
<a name="MAX_TABLE_SIZE">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>MAX_TABLE_SIZE</h4>
<pre>protected static final&nbsp;int MAX_TABLE_SIZE</pre>
<div class="block">Let's not expand symbol tables past some maximum size;
 this should protected against OOMEs caused by large documents
 with uniquer (~= random) names.</div>
<dl><dt><span class="strong">See Also:</span></dt><dd><a href="../../../../constant-values.html#org.codehaus.jackson.sym.CharsToNameCanonicalizer.MAX_TABLE_SIZE">Constant Field Values</a></dd></dl>
</li>
</ul>
<a name="_parent">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>_parent</h4>
<pre>protected&nbsp;<a href="../../../../org/codehaus/jackson/sym/CharsToNameCanonicalizer.html" title="class in org.codehaus.jackson.sym">CharsToNameCanonicalizer</a> _parent</pre>
<div class="block">Sharing of learnt symbols is done by optional linking of symbol
 table instances with their parents. When parent linkage is
 defined, and child instance is released (call to <code>release</code>),
 parent's shared tables may be updated from the child instance.</div>
</li>
</ul>
<a name="_intern">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>_intern</h4>
<pre>protected final&nbsp;boolean _intern</pre>
<div class="block">Whether canonical symbol Strings are to be intern()ed before added
 to the table or not</div>
</li>
</ul>
<a name="_canonicalize">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>_canonicalize</h4>
<pre>protected final&nbsp;boolean _canonicalize</pre>
<div class="block">Whether any canonicalization should be attempted (whether using
 intern or not)</div>
</li>
</ul>
<a name="_symbols">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>_symbols</h4>
<pre>protected&nbsp;<a href="http://docs.oracle.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>[] _symbols</pre>
<div class="block">Primary matching symbols; it's expected most match occur from
 here.</div>
</li>
</ul>
<a name="_buckets">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>_buckets</h4>
<pre>protected&nbsp;org.codehaus.jackson.sym.CharsToNameCanonicalizer.Bucket[] _buckets</pre>
<div class="block">Overflow buckets; if primary doesn't match, lookup is done
 from here.
<p>
 Note: Number of buckets is half of number of symbol entries, on
 assumption there's less need for buckets.</div>
</li>
</ul>
<a name="_size">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>_size</h4>
<pre>protected&nbsp;int _size</pre>
<div class="block">Current size (number of entries); needed to know if and when
 rehash.</div>
</li>
</ul>
<a name="_sizeThreshold">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>_sizeThreshold</h4>
<pre>protected&nbsp;int _sizeThreshold</pre>
<div class="block">Limit that indicates maximum size this instance can hold before
 it needs to be expanded and rehashed. Calculated using fill
 factor passed in to constructor.</div>
</li>
</ul>
<a name="_indexMask">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>_indexMask</h4>
<pre>protected&nbsp;int _indexMask</pre>
<div class="block">Mask used to get index from hash values; equal to
 <code>_buckets.length - 1</code>, when _buckets.length is
 a power of two.</div>
</li>
</ul>
<a name="_longestCollisionList">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>_longestCollisionList</h4>
<pre>protected&nbsp;int _longestCollisionList</pre>
<div class="block">We need to keep track of the longest collision list; this is needed
 both to indicate problems with attacks and to allow flushing for
 other cases.</div>
<dl><dt><span class="strong">Since:</span></dt>
  <dd>1.9.9</dd></dl>
</li>
</ul>
<a name="_dirty">
<!--   -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>_dirty</h4>
<pre>protected&nbsp;boolean _dirty</pre>
<div class="block">Flag that indicates if any changes have been made to the data;
 used to both determine if bucket array needs to be copied when
 (first) change is made, and potentially if updated bucket list
 is to be resync'ed back to master instance.</div>
</li>
</ul>
</li>
</ul>
<!-- ============ METHOD DETAIL ========== -->
<ul class="blockList">
<li class="blockList"><a name="method_detail">
<!--   -->
</a>
<h3>Method Detail</h3>
<a name="createRoot()">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>createRoot</h4>
<pre>public static&nbsp;<a href="../../../../org/codehaus/jackson/sym/CharsToNameCanonicalizer.html" title="class in org.codehaus.jackson.sym">CharsToNameCanonicalizer</a>&nbsp;createRoot()</pre>
<div class="block">Method called to create root canonicalizer for a <a href="../../../../org/codehaus/jackson/JsonFactory.html" title="class in org.codehaus.jackson"><code>JsonFactory</code></a>
 instance. Root instance is never used directly; its main use is for
 storing and sharing underlying symbol arrays as needed.</div>
</li>
</ul>
<a name="createRoot(int)">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>createRoot</h4>
<pre>protected static&nbsp;<a href="../../../../org/codehaus/jackson/sym/CharsToNameCanonicalizer.html" title="class in org.codehaus.jackson.sym">CharsToNameCanonicalizer</a>&nbsp;createRoot(int&nbsp;hashSeed)</pre>
</li>
</ul>
<a name="makeChild(boolean, boolean)">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>makeChild</h4>
<pre>public&nbsp;<a href="../../../../org/codehaus/jackson/sym/CharsToNameCanonicalizer.html" title="class in org.codehaus.jackson.sym">CharsToNameCanonicalizer</a>&nbsp;makeChild(boolean&nbsp;canonicalize,
                                 boolean&nbsp;intern)</pre>
<div class="block">"Factory" method; will create a new child instance of this symbol
 table. It will be a copy-on-write instance, ie. it will only use
 read-only copy of parent's data, but when changes are needed, a
 copy will be created.
<p>
 Note: while this method is synchronized, it is generally not
 safe to both use makeChild/mergeChild, AND to use instance
 actively. Instead, a separate 'root' instance should be used
 on which only makeChild/mergeChild are called, but instance itself
 is not used as a symbol table.</div>
</li>
</ul>
<a name="release()">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>release</h4>
<pre>public&nbsp;void&nbsp;release()</pre>
</li>
</ul>
<a name="size()">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>size</h4>
<pre>public&nbsp;int&nbsp;size()</pre>
</li>
</ul>
<a name="bucketCount()">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>bucketCount</h4>
<pre>public&nbsp;int&nbsp;bucketCount()</pre>
<div class="block">Method for checking number of primary hash buckets this symbol
 table uses.</div>
<dl><dt><span class="strong">Since:</span></dt>
  <dd>1.9.9</dd></dl>
</li>
</ul>
<a name="maybeDirty()">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>maybeDirty</h4>
<pre>public&nbsp;boolean&nbsp;maybeDirty()</pre>
</li>
</ul>
<a name="hashSeed()">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>hashSeed</h4>
<pre>public&nbsp;int&nbsp;hashSeed()</pre>
</li>
</ul>
<a name="collisionCount()">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>collisionCount</h4>
<pre>public&nbsp;int&nbsp;collisionCount()</pre>
<div class="block">Method mostly needed by unit tests; calculates number of
 entries that are in collision list. Value can be at most
 (<a href="../../../../org/codehaus/jackson/sym/CharsToNameCanonicalizer.html#size()"><code>size()</code></a> - 1), but should usually be much lower, ideally 0.</div>
<dl><dt><span class="strong">Since:</span></dt>
  <dd>1.9.9</dd></dl>
</li>
</ul>
<a name="maxCollisionLength()">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>maxCollisionLength</h4>
<pre>public&nbsp;int&nbsp;maxCollisionLength()</pre>
<div class="block">Method mostly needed by unit tests; calculates length of the
 longest collision chain. This should typically be a low number,
 but may be up to <a href="../../../../org/codehaus/jackson/sym/CharsToNameCanonicalizer.html#size()"><code>size()</code></a> - 1 in the pathological case</div>
<dl><dt><span class="strong">Since:</span></dt>
  <dd>1.9.9</dd></dl>
</li>
</ul>
<a name="findSymbol(char[], int, int, int)">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>findSymbol</h4>
<pre>public&nbsp;<a href="http://docs.oracle.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;findSymbol(char[]&nbsp;buffer,
                int&nbsp;start,
                int&nbsp;len,
                int&nbsp;h)</pre>
</li>
</ul>
<a name="_hashToIndex(int)">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>_hashToIndex</h4>
<pre>public final&nbsp;int&nbsp;_hashToIndex(int&nbsp;rawHash)</pre>
<div class="block">Helper method that takes in a "raw" hash value, shuffles it as necessary,
 and truncates to be used as the index.</div>
</li>
</ul>
<a name="calcHash(char[], int, int)">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>calcHash</h4>
<pre>public&nbsp;int&nbsp;calcHash(char[]&nbsp;buffer,
           int&nbsp;start,
           int&nbsp;len)</pre>
<div class="block">Implementation of a hashing method for variable length
 Strings. Most of the time intention is that this calculation
 is done by caller during parsing, not here; however, sometimes
 it needs to be done for parsed "String" too.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>len</code> - Length of String; has to be at least 1 (caller guarantees
   this pre-condition)</dd></dl>
</li>
</ul>
<a name="calcHash(java.lang.String)">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>calcHash</h4>
<pre>public&nbsp;int&nbsp;calcHash(<a href="http://docs.oracle.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;key)</pre>
</li>
</ul>
<a name="reportTooManyCollisions(int)">
<!--   -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>reportTooManyCollisions</h4>
<pre>protected&nbsp;void&nbsp;reportTooManyCollisions(int&nbsp;maxLen)</pre>
<dl><dt><span class="strong">Since:</span></dt>
  <dd>1.9.9</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><a href="#skip-navbar_bottom" title="Skip navigation links"></a><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="class-use/CharsToNameCanonicalizer.html">Use</a></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/codehaus/jackson/sym/BytesToNameCanonicalizer.html" title="class in org.codehaus.jackson.sym"><span class="strong">Prev Class</span></a></li>
<li><a href="../../../../org/codehaus/jackson/sym/Name.html" title="class in org.codehaus.jackson.sym"><span class="strong">Next Class</span></a></li>
</ul>
<ul class="navList">
<li><a href="../../../../index.html?org/codehaus/jackson/sym/CharsToNameCanonicalizer.html" target="_top">Frames</a></li>
<li><a href="CharsToNameCanonicalizer.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:&nbsp;</li>
<li>Nested&nbsp;|&nbsp;</li>
<li><a href="#field_summary">Field</a>&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><a href="#field_detail">Field</a>&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 ======= -->
</body>
</html>