1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<!--NewPage-->
<HTML>
<HEAD>
<!-- Generated by javadoc (build 1.6.0_03) on Fri Jan 25 23:29:23 CET 2008 -->
<TITLE>
StringIntHashMap (JiBX Java data binding to XML - Version 1.0)
</TITLE>
<META NAME="date" CONTENT="2008-01-25">
<LINK REL ="stylesheet" TYPE="text/css" HREF="../../../../stylesheet.css" TITLE="Style">
<SCRIPT type="text/javascript">
function windowTitle()
{
if (location.href.indexOf('is-external=true') == -1) {
parent.document.title="StringIntHashMap (JiBX Java data binding to XML - Version 1.0)";
}
}
</SCRIPT>
<NOSCRIPT>
</NOSCRIPT>
</HEAD>
<BODY BGCOLOR="white" onload="windowTitle();">
<HR>
<!-- ========= START OF TOP NAVBAR ======= -->
<A NAME="navbar_top"><!-- --></A>
<A HREF="#skip-navbar_top" title="Skip navigation links"></A>
<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
<TR>
<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
<A NAME="navbar_top_firstrow"><!-- --></A>
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
<TR ALIGN="center" VALIGN="top">
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD>
<TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD>
</TR>
</TABLE>
</TD>
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
</EM>
</TD>
</TR>
<TR>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
<A HREF="../../../../org/jibx/runtime/impl/StreamWriterBase.html" title="class in org.jibx.runtime.impl"><B>PREV CLASS</B></A>
<A HREF="../../../../org/jibx/runtime/impl/UnmarshallingContext.html" title="class in org.jibx.runtime.impl"><B>NEXT CLASS</B></A></FONT></TD>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
<A HREF="../../../../index.html?org/jibx/runtime/impl/StringIntHashMap.html" target="_top"><B>FRAMES</B></A>
<A HREF="StringIntHashMap.html" target="_top"><B>NO FRAMES</B></A>
<SCRIPT type="text/javascript">
<!--
if(window==top) {
document.writeln('<A HREF="../../../../allclasses-noframe.html"><B>All Classes</B></A>');
}
//-->
</SCRIPT>
<NOSCRIPT>
<A HREF="../../../../allclasses-noframe.html"><B>All Classes</B></A>
</NOSCRIPT>
</FONT></TD>
</TR>
<TR>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
SUMMARY: NESTED | <A HREF="#field_summary">FIELD</A> | <A HREF="#constructor_summary">CONSTR</A> | <A HREF="#method_summary">METHOD</A></FONT></TD>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
DETAIL: <A HREF="#field_detail">FIELD</A> | <A HREF="#constructor_detail">CONSTR</A> | <A HREF="#method_detail">METHOD</A></FONT></TD>
</TR>
</TABLE>
<A NAME="skip-navbar_top"></A>
<!-- ========= END OF TOP NAVBAR ========= -->
<HR>
<!-- ======== START OF CLASS DATA ======== -->
<H2>
<FONT SIZE="-1">
org.jibx.runtime.impl</FONT>
<BR>
Class StringIntHashMap</H2>
<PRE>
java.lang.Object
<IMG SRC="../../../../resources/inherit.gif" ALT="extended by "><B>org.jibx.runtime.impl.StringIntHashMap</B>
</PRE>
<HR>
<DL>
<DT><PRE>public class <B>StringIntHashMap</B><DT>extends java.lang.Object</DL>
</PRE>
<P>
Hash map using <code>String</code> values as keys mapped to primitive
<code>int</code> values. This implementation is unsynchronized in order to
provide the best possible performance for typical usage scenarios, so
explicit synchronization must be implemented by a wrapper class or directly
by the application in cases where instances are modified in a multithreaded
environment. The map implementation is not very efficient when resizing, but
works well when the size of the map is known in advance.
<P>
<P>
<DL>
<DT><B>Version:</B></DT>
<DD>1.1</DD>
<DT><B>Author:</B></DT>
<DD>Dennis M. Sosnoski</DD>
</DL>
<HR>
<P>
<!-- =========== FIELD SUMMARY =========== -->
<A NAME="field_summary"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
<B>Field Summary</B></FONT></TH>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>protected static double</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/jibx/runtime/impl/StringIntHashMap.html#DEFAULT_FILL">DEFAULT_FILL</A></B></CODE>
<BR>
Default fill fraction allowed before growing table.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static int</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/jibx/runtime/impl/StringIntHashMap.html#DEFAULT_NOT_FOUND">DEFAULT_NOT_FOUND</A></B></CODE>
<BR>
Default value returned when key not found in table.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>protected int</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/jibx/runtime/impl/StringIntHashMap.html#m_arraySize">m_arraySize</A></B></CODE>
<BR>
Size of array used for keys.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>protected int</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/jibx/runtime/impl/StringIntHashMap.html#m_entryCount">m_entryCount</A></B></CODE>
<BR>
Number of entries present in table.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>protected int</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/jibx/runtime/impl/StringIntHashMap.html#m_entryLimit">m_entryLimit</A></B></CODE>
<BR>
Entries allowed before growing table.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>protected double</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/jibx/runtime/impl/StringIntHashMap.html#m_fillFraction">m_fillFraction</A></B></CODE>
<BR>
Fill fraction allowed for this hash table.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>protected int</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/jibx/runtime/impl/StringIntHashMap.html#m_hitOffset">m_hitOffset</A></B></CODE>
<BR>
Offset added (modulo table size) to slot number on collision.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>protected java.lang.String[]</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/jibx/runtime/impl/StringIntHashMap.html#m_keyTable">m_keyTable</A></B></CODE>
<BR>
Array of key table slots.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>protected int</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/jibx/runtime/impl/StringIntHashMap.html#m_notFoundValue">m_notFoundValue</A></B></CODE>
<BR>
Value returned when key not found in table.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>protected int[]</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/jibx/runtime/impl/StringIntHashMap.html#m_valueTable">m_valueTable</A></B></CODE>
<BR>
Array of value table slots.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>protected static int</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/jibx/runtime/impl/StringIntHashMap.html#MINIMUM_SIZE">MINIMUM_SIZE</A></B></CODE>
<BR>
Minimum size used for hash table.</TD>
</TR>
</TABLE>
<!-- ======== CONSTRUCTOR SUMMARY ======== -->
<A NAME="constructor_summary"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
<B>Constructor Summary</B></FONT></TH>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE><B><A HREF="../../../../org/jibx/runtime/impl/StringIntHashMap.html#StringIntHashMap()">StringIntHashMap</A></B>()</CODE>
<BR>
Default constructor.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE><B><A HREF="../../../../org/jibx/runtime/impl/StringIntHashMap.html#StringIntHashMap(int)">StringIntHashMap</A></B>(int count)</CODE>
<BR>
Constructor with only size supplied.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE><B><A HREF="../../../../org/jibx/runtime/impl/StringIntHashMap.html#StringIntHashMap(int, double)">StringIntHashMap</A></B>(int count,
double fill)</CODE>
<BR>
Constructor with size and fill fraction specified.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE><B><A HREF="../../../../org/jibx/runtime/impl/StringIntHashMap.html#StringIntHashMap(int, double, int)">StringIntHashMap</A></B>(int count,
double fill,
int miss)</CODE>
<BR>
Constructor with full specification.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE><B><A HREF="../../../../org/jibx/runtime/impl/StringIntHashMap.html#StringIntHashMap(org.jibx.runtime.impl.StringIntHashMap)">StringIntHashMap</A></B>(<A HREF="../../../../org/jibx/runtime/impl/StringIntHashMap.html" title="class in org.jibx.runtime.impl">StringIntHashMap</A> base)</CODE>
<BR>
Copy (clone) constructor.</TD>
</TR>
</TABLE>
<!-- ========== METHOD SUMMARY =========== -->
<A NAME="method_summary"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
<B>Method Summary</B></FONT></TH>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> int</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/jibx/runtime/impl/StringIntHashMap.html#add(java.lang.String, int)">add</A></B>(java.lang.String key,
int value)</CODE>
<BR>
Add an entry to the table.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>private int</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/jibx/runtime/impl/StringIntHashMap.html#assignSlot(java.lang.String, int)">assignSlot</A></B>(java.lang.String key,
int value)</CODE>
<BR>
Assign slot for entry.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> java.lang.Object</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/jibx/runtime/impl/StringIntHashMap.html#clone()">clone</A></B>()</CODE>
<BR>
Construct a copy of the table.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> boolean</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/jibx/runtime/impl/StringIntHashMap.html#containsKey(java.lang.String)">containsKey</A></B>(java.lang.String key)</CODE>
<BR>
Check if an entry is present in the table.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>private int</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/jibx/runtime/impl/StringIntHashMap.html#freeSlot(int)">freeSlot</A></B>(int slot)</CODE>
<BR>
Find free slot number for entry.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> int</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/jibx/runtime/impl/StringIntHashMap.html#get(java.lang.String)">get</A></B>(java.lang.String key)</CODE>
<BR>
Find an entry in the table.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>protected void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/jibx/runtime/impl/StringIntHashMap.html#internalRemove(int)">internalRemove</A></B>(int slot)</CODE>
<BR>
Internal remove pair from the table.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>private boolean</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/jibx/runtime/impl/StringIntHashMap.html#reinsert(int)">reinsert</A></B>(int slot)</CODE>
<BR>
Reinsert an entry into the hash map.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> int</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/jibx/runtime/impl/StringIntHashMap.html#remove(java.lang.String)">remove</A></B>(java.lang.String key)</CODE>
<BR>
Remove an entry from the table.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>private void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/jibx/runtime/impl/StringIntHashMap.html#restructure(java.lang.String[], int[])">restructure</A></B>(java.lang.String[] keys,
int[] values)</CODE>
<BR>
Restructure the table.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>private int</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/jibx/runtime/impl/StringIntHashMap.html#standardFind(java.lang.Object)">standardFind</A></B>(java.lang.Object key)</CODE>
<BR>
Standard find key in table.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>private int</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/jibx/runtime/impl/StringIntHashMap.html#standardSlot(java.lang.Object)">standardSlot</A></B>(java.lang.Object key)</CODE>
<BR>
Standard base slot computation for a key.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>private int</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/jibx/runtime/impl/StringIntHashMap.html#stepSlot(int)">stepSlot</A></B>(int slot)</CODE>
<BR>
Step the slot number for an entry.</TD>
</TR>
</TABLE>
<A NAME="methods_inherited_from_class_java.lang.Object"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
<TH ALIGN="left"><B>Methods inherited from class java.lang.Object</B></TH>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE>equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait</CODE></TD>
</TR>
</TABLE>
<P>
<!-- ============ FIELD DETAIL =========== -->
<A NAME="field_detail"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2">
<B>Field Detail</B></FONT></TH>
</TR>
</TABLE>
<A NAME="DEFAULT_NOT_FOUND"><!-- --></A><H3>
DEFAULT_NOT_FOUND</H3>
<PRE>
public static final int <B>DEFAULT_NOT_FOUND</B></PRE>
<DL>
<DD>Default value returned when key not found in table.
<P>
<DL>
<DT><B>See Also:</B><DD><A HREF="../../../../constant-values.html#org.jibx.runtime.impl.StringIntHashMap.DEFAULT_NOT_FOUND">Constant Field Values</A></DL>
</DL>
<HR>
<A NAME="DEFAULT_FILL"><!-- --></A><H3>
DEFAULT_FILL</H3>
<PRE>
protected static final double <B>DEFAULT_FILL</B></PRE>
<DL>
<DD>Default fill fraction allowed before growing table.
<P>
<DL>
<DT><B>See Also:</B><DD><A HREF="../../../../constant-values.html#org.jibx.runtime.impl.StringIntHashMap.DEFAULT_FILL">Constant Field Values</A></DL>
</DL>
<HR>
<A NAME="MINIMUM_SIZE"><!-- --></A><H3>
MINIMUM_SIZE</H3>
<PRE>
protected static final int <B>MINIMUM_SIZE</B></PRE>
<DL>
<DD>Minimum size used for hash table.
<P>
<DL>
<DT><B>See Also:</B><DD><A HREF="../../../../constant-values.html#org.jibx.runtime.impl.StringIntHashMap.MINIMUM_SIZE">Constant Field Values</A></DL>
</DL>
<HR>
<A NAME="m_fillFraction"><!-- --></A><H3>
m_fillFraction</H3>
<PRE>
protected final double <B>m_fillFraction</B></PRE>
<DL>
<DD>Fill fraction allowed for this hash table.
<P>
<DL>
</DL>
</DL>
<HR>
<A NAME="m_entryCount"><!-- --></A><H3>
m_entryCount</H3>
<PRE>
protected int <B>m_entryCount</B></PRE>
<DL>
<DD>Number of entries present in table.
<P>
<DL>
</DL>
</DL>
<HR>
<A NAME="m_entryLimit"><!-- --></A><H3>
m_entryLimit</H3>
<PRE>
protected int <B>m_entryLimit</B></PRE>
<DL>
<DD>Entries allowed before growing table.
<P>
<DL>
</DL>
</DL>
<HR>
<A NAME="m_arraySize"><!-- --></A><H3>
m_arraySize</H3>
<PRE>
protected int <B>m_arraySize</B></PRE>
<DL>
<DD>Size of array used for keys.
<P>
<DL>
</DL>
</DL>
<HR>
<A NAME="m_hitOffset"><!-- --></A><H3>
m_hitOffset</H3>
<PRE>
protected int <B>m_hitOffset</B></PRE>
<DL>
<DD>Offset added (modulo table size) to slot number on collision.
<P>
<DL>
</DL>
</DL>
<HR>
<A NAME="m_keyTable"><!-- --></A><H3>
m_keyTable</H3>
<PRE>
protected java.lang.String[] <B>m_keyTable</B></PRE>
<DL>
<DD>Array of key table slots.
<P>
<DL>
</DL>
</DL>
<HR>
<A NAME="m_valueTable"><!-- --></A><H3>
m_valueTable</H3>
<PRE>
protected int[] <B>m_valueTable</B></PRE>
<DL>
<DD>Array of value table slots.
<P>
<DL>
</DL>
</DL>
<HR>
<A NAME="m_notFoundValue"><!-- --></A><H3>
m_notFoundValue</H3>
<PRE>
protected int <B>m_notFoundValue</B></PRE>
<DL>
<DD>Value returned when key not found in table.
<P>
<DL>
</DL>
</DL>
<!-- ========= CONSTRUCTOR DETAIL ======== -->
<A NAME="constructor_detail"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2">
<B>Constructor Detail</B></FONT></TH>
</TR>
</TABLE>
<A NAME="StringIntHashMap(int, double, int)"><!-- --></A><H3>
StringIntHashMap</H3>
<PRE>
public <B>StringIntHashMap</B>(int count,
double fill,
int miss)</PRE>
<DL>
<DD>Constructor with full specification.
<P>
<DL>
<DT><B>Parameters:</B><DD><CODE>count</CODE> - number of values to assume in initial sizing of table<DD><CODE>fill</CODE> - fraction full allowed for table before growing<DD><CODE>miss</CODE> - value returned when key not found in table</DL>
</DL>
<HR>
<A NAME="StringIntHashMap(int, double)"><!-- --></A><H3>
StringIntHashMap</H3>
<PRE>
public <B>StringIntHashMap</B>(int count,
double fill)</PRE>
<DL>
<DD>Constructor with size and fill fraction specified. Uses default hash
technique and value returned when key not found in table.
<P>
<DL>
<DT><B>Parameters:</B><DD><CODE>count</CODE> - number of values to assume in initial sizing of table<DD><CODE>fill</CODE> - fraction full allowed for table before growing</DL>
</DL>
<HR>
<A NAME="StringIntHashMap(int)"><!-- --></A><H3>
StringIntHashMap</H3>
<PRE>
public <B>StringIntHashMap</B>(int count)</PRE>
<DL>
<DD>Constructor with only size supplied. Uses default hash technique and
values for fill fraction and value returned when key not found in table.
<P>
<DL>
<DT><B>Parameters:</B><DD><CODE>count</CODE> - number of values to assume in initial sizing of table</DL>
</DL>
<HR>
<A NAME="StringIntHashMap()"><!-- --></A><H3>
StringIntHashMap</H3>
<PRE>
public <B>StringIntHashMap</B>()</PRE>
<DL>
<DD>Default constructor.
<P>
</DL>
<HR>
<A NAME="StringIntHashMap(org.jibx.runtime.impl.StringIntHashMap)"><!-- --></A><H3>
StringIntHashMap</H3>
<PRE>
public <B>StringIntHashMap</B>(<A HREF="../../../../org/jibx/runtime/impl/StringIntHashMap.html" title="class in org.jibx.runtime.impl">StringIntHashMap</A> base)</PRE>
<DL>
<DD>Copy (clone) constructor.
<P>
<DL>
<DT><B>Parameters:</B><DD><CODE>base</CODE> - instance being copied</DL>
</DL>
<!-- ============ METHOD DETAIL ========== -->
<A NAME="method_detail"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2">
<B>Method Detail</B></FONT></TH>
</TR>
</TABLE>
<A NAME="stepSlot(int)"><!-- --></A><H3>
stepSlot</H3>
<PRE>
private final int <B>stepSlot</B>(int slot)</PRE>
<DL>
<DD>Step the slot number for an entry. Adds the collision offset (modulo
the table size) to the slot number.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>slot</CODE> - slot number to be stepped
<DT><B>Returns:</B><DD>stepped slot number</DL>
</DD>
</DL>
<HR>
<A NAME="freeSlot(int)"><!-- --></A><H3>
freeSlot</H3>
<PRE>
private final int <B>freeSlot</B>(int slot)</PRE>
<DL>
<DD>Find free slot number for entry. Starts at the slot based directly
on the hashed key value. If this slot is already occupied, it adds
the collision offset (modulo the table size) to the slot number and
checks that slot, repeating until an unused slot is found.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>slot</CODE> - initial slot computed from key
<DT><B>Returns:</B><DD>slot at which entry was added</DL>
</DD>
</DL>
<HR>
<A NAME="standardSlot(java.lang.Object)"><!-- --></A><H3>
standardSlot</H3>
<PRE>
private final int <B>standardSlot</B>(java.lang.Object key)</PRE>
<DL>
<DD>Standard base slot computation for a key.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>key</CODE> - key value to be computed
<DT><B>Returns:</B><DD>base slot for key</DL>
</DD>
</DL>
<HR>
<A NAME="standardFind(java.lang.Object)"><!-- --></A><H3>
standardFind</H3>
<PRE>
private int <B>standardFind</B>(java.lang.Object key)</PRE>
<DL>
<DD>Standard find key in table. This method may be used directly for key
lookup using either the <code>hashCode()</code> method defined for the
key objects or the <code>System.identityHashCode()</code> method, and
either the <code>equals()</code> method defined for the key objects or
the <code>==</code> operator, as selected by the hash technique
constructor parameter. To implement a hash class based on some other
methods of hashing and/or equality testing, define a separate method in
the subclass with a different name and use that method instead. This
avoids the overhead caused by overrides of a very heavily used method.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>key</CODE> - to be found in table
<DT><B>Returns:</B><DD>index of matching key, or <code>-index-1</code> of slot to be
used for inserting key in table if not already present (always negative)</DL>
</DD>
</DL>
<HR>
<A NAME="reinsert(int)"><!-- --></A><H3>
reinsert</H3>
<PRE>
private boolean <B>reinsert</B>(int slot)</PRE>
<DL>
<DD>Reinsert an entry into the hash map. This is used when the table is being
directly modified, and does not adjust the count present or check the
table capacity.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>slot</CODE> - position of entry to be reinserted into hash map
<DT><B>Returns:</B><DD><code>true</code> if the slot number used by the entry has has
changed, <code>false</code> if not</DL>
</DD>
</DL>
<HR>
<A NAME="internalRemove(int)"><!-- --></A><H3>
internalRemove</H3>
<PRE>
protected void <B>internalRemove</B>(int slot)</PRE>
<DL>
<DD>Internal remove pair from the table. Removes the pair from the table
by setting the key entry to <code>null</code> and adjusting the count
present, then chains through the table to reinsert any other pairs
which may have collided with the removed pair. If the associated value
is an object reference, it should be set to <code>null</code> before
this method is called.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>slot</CODE> - index number of pair to be removed</DL>
</DD>
</DL>
<HR>
<A NAME="restructure(java.lang.String[], int[])"><!-- --></A><H3>
restructure</H3>
<PRE>
private void <B>restructure</B>(java.lang.String[] keys,
int[] values)</PRE>
<DL>
<DD>Restructure the table. This is used when the table is increasing or
decreasing in size, and works directly with the old table representation
arrays. It inserts pairs from the old arrays directly into the table
without adjusting the count present or checking the table size.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>keys</CODE> - array of keys<DD><CODE>values</CODE> - array of values</DL>
</DD>
</DL>
<HR>
<A NAME="assignSlot(java.lang.String, int)"><!-- --></A><H3>
assignSlot</H3>
<PRE>
private int <B>assignSlot</B>(java.lang.String key,
int value)</PRE>
<DL>
<DD>Assign slot for entry. Starts at the slot found by the hashed key value.
If this slot is already occupied, it steps the slot number and checks the
resulting slot, repeating until an unused slot is found. This method does
not check for duplicate keys, so it should only be used for internal
reordering of the tables.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>key</CODE> - to be added to table<DD><CODE>value</CODE> - associated value for key
<DT><B>Returns:</B><DD>slot at which entry was added</DL>
</DD>
</DL>
<HR>
<A NAME="add(java.lang.String, int)"><!-- --></A><H3>
add</H3>
<PRE>
public int <B>add</B>(java.lang.String key,
int value)</PRE>
<DL>
<DD>Add an entry to the table. If the key is already present in the table,
this replaces the existing value associated with the key.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>key</CODE> - key to be added to table (non- <code>null</code>)<DD><CODE>value</CODE> - associated value for key
<DT><B>Returns:</B><DD>value previously associated with key, or reserved not found value
if key not previously present in table</DL>
</DD>
</DL>
<HR>
<A NAME="containsKey(java.lang.String)"><!-- --></A><H3>
containsKey</H3>
<PRE>
public final boolean <B>containsKey</B>(java.lang.String key)</PRE>
<DL>
<DD>Check if an entry is present in the table. This method is supplied to
support the use of values matching the reserved not found value.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>key</CODE> - key for entry to be found
<DT><B>Returns:</B><DD><code>true</code> if key found in table, <code>false</code>
if not</DL>
</DD>
</DL>
<HR>
<A NAME="get(java.lang.String)"><!-- --></A><H3>
get</H3>
<PRE>
public final int <B>get</B>(java.lang.String key)</PRE>
<DL>
<DD>Find an entry in the table.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>key</CODE> - key for entry to be returned
<DT><B>Returns:</B><DD>value for key, or reserved not found value if key not found</DL>
</DD>
</DL>
<HR>
<A NAME="remove(java.lang.String)"><!-- --></A><H3>
remove</H3>
<PRE>
public int <B>remove</B>(java.lang.String key)</PRE>
<DL>
<DD>Remove an entry from the table. If multiple entries are present with the
same key value, only the first one found will be removed.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>key</CODE> - key to be removed from table
<DT><B>Returns:</B><DD>value associated with removed key, or reserved not found value if
key not found in table</DL>
</DD>
</DL>
<HR>
<A NAME="clone()"><!-- --></A><H3>
clone</H3>
<PRE>
public java.lang.Object <B>clone</B>()</PRE>
<DL>
<DD>Construct a copy of the table.
<P>
<DD><DL>
<DT><B>Overrides:</B><DD><CODE>clone</CODE> in class <CODE>java.lang.Object</CODE></DL>
</DD>
<DD><DL>
<DT><B>Returns:</B><DD>shallow copy of table</DL>
</DD>
</DL>
<!-- ========= END OF CLASS DATA ========= -->
<HR>
<!-- ======= START OF BOTTOM NAVBAR ====== -->
<A NAME="navbar_bottom"><!-- --></A>
<A HREF="#skip-navbar_bottom" title="Skip navigation links"></A>
<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
<TR>
<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
<A NAME="navbar_bottom_firstrow"><!-- --></A>
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
<TR ALIGN="center" VALIGN="top">
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD>
<TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD>
</TR>
</TABLE>
</TD>
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
</EM>
</TD>
</TR>
<TR>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
<A HREF="../../../../org/jibx/runtime/impl/StreamWriterBase.html" title="class in org.jibx.runtime.impl"><B>PREV CLASS</B></A>
<A HREF="../../../../org/jibx/runtime/impl/UnmarshallingContext.html" title="class in org.jibx.runtime.impl"><B>NEXT CLASS</B></A></FONT></TD>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
<A HREF="../../../../index.html?org/jibx/runtime/impl/StringIntHashMap.html" target="_top"><B>FRAMES</B></A>
<A HREF="StringIntHashMap.html" target="_top"><B>NO FRAMES</B></A>
<SCRIPT type="text/javascript">
<!--
if(window==top) {
document.writeln('<A HREF="../../../../allclasses-noframe.html"><B>All Classes</B></A>');
}
//-->
</SCRIPT>
<NOSCRIPT>
<A HREF="../../../../allclasses-noframe.html"><B>All Classes</B></A>
</NOSCRIPT>
</FONT></TD>
</TR>
<TR>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
SUMMARY: NESTED | <A HREF="#field_summary">FIELD</A> | <A HREF="#constructor_summary">CONSTR</A> | <A HREF="#method_summary">METHOD</A></FONT></TD>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
DETAIL: <A HREF="#field_detail">FIELD</A> | <A HREF="#constructor_detail">CONSTR</A> | <A HREF="#method_detail">METHOD</A></FONT></TD>
</TR>
</TABLE>
<A NAME="skip-navbar_bottom"></A>
<!-- ======== END OF BOTTOM NAVBAR ======= -->
<HR>
<table width='80%%'><tr><td width='50%%'><p align='center'><a href='http://www.jibx.org/' target='_top'><font size='3'><b>Project Web Site</b></font></a></td><td width='50%%'><p align='center'></td></tr></table>
</BODY>
</HTML>
|