1 <!DOCTYPE HTML PUBLIC
"-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
5 <!-- Generated by javadoc (build 1.4.2_16) on Sat Mar 15 20:43:48 PDT 2008 -->
6 <META http-equiv=
"Content-Type" content=
"text/html; charset=ISO-8859-1">
8 HashCodeBuilder (Commons Lang
2.4 API)
11 <META NAME=
"keywords" CONTENT=
"org.apache.commons.lang.builder.HashCodeBuilder class">
13 <LINK REL =
"stylesheet" TYPE=
"text/css" HREF=
"../../../../../stylesheet.css" TITLE=
"Style">
15 <SCRIPT type=
"text/javascript">
16 function windowTitle()
18 parent.document.
title=
"HashCodeBuilder (Commons Lang 2.4 API)";
24 <BODY BGCOLOR=
"white" onload=
"windowTitle();">
27 <!-- ========= START OF TOP NAVBAR ======= -->
28 <A NAME=
"navbar_top"><!-- --></A>
29 <A HREF=
"#skip-navbar_top" title=
"Skip navigation links"></A>
30 <TABLE BORDER=
"0" WIDTH=
"100%" CELLPADDING=
"1" CELLSPACING=
"0" SUMMARY=
"">
32 <TD COLSPAN=
3 BGCOLOR=
"#EEEEFF" CLASS=
"NavBarCell1">
33 <A NAME=
"navbar_top_firstrow"><!-- --></A>
34 <TABLE BORDER=
"0" CELLPADDING=
"0" CELLSPACING=
"3" SUMMARY=
"">
35 <TR ALIGN=
"center" VALIGN=
"top">
36 <TD BGCOLOR=
"#EEEEFF" CLASS=
"NavBarCell1"> <A HREF=
"../../../../../overview-summary.html"><FONT CLASS=
"NavBarFont1"><B>Overview
</B></FONT></A> </TD>
37 <TD BGCOLOR=
"#EEEEFF" CLASS=
"NavBarCell1"> <A HREF=
"package-summary.html"><FONT CLASS=
"NavBarFont1"><B>Package
</B></FONT></A> </TD>
38 <TD BGCOLOR=
"#FFFFFF" CLASS=
"NavBarCell1Rev"> <FONT CLASS=
"NavBarFont1Rev"><B>Class
</B></FONT> </TD>
39 <TD BGCOLOR=
"#EEEEFF" CLASS=
"NavBarCell1"> <A HREF=
"class-use/HashCodeBuilder.html"><FONT CLASS=
"NavBarFont1"><B>Use
</B></FONT></A> </TD>
40 <TD BGCOLOR=
"#EEEEFF" CLASS=
"NavBarCell1"> <A HREF=
"package-tree.html"><FONT CLASS=
"NavBarFont1"><B>Tree
</B></FONT></A> </TD>
41 <TD BGCOLOR=
"#EEEEFF" CLASS=
"NavBarCell1"> <A HREF=
"../../../../../deprecated-list.html"><FONT CLASS=
"NavBarFont1"><B>Deprecated
</B></FONT></A> </TD>
42 <TD BGCOLOR=
"#EEEEFF" CLASS=
"NavBarCell1"> <A HREF=
"../../../../../index-all.html"><FONT CLASS=
"NavBarFont1"><B>Index
</B></FONT></A> </TD>
43 <TD BGCOLOR=
"#EEEEFF" CLASS=
"NavBarCell1"> <A HREF=
"../../../../../help-doc.html"><FONT CLASS=
"NavBarFont1"><B>Help
</B></FONT></A> </TD>
47 <TD ALIGN=
"right" VALIGN=
"top" ROWSPAN=
3><EM>
53 <TD BGCOLOR=
"white" CLASS=
"NavBarCell2"><FONT SIZE=
"-2">
54 <A HREF=
"../../../../../org/apache/commons/lang/builder/EqualsBuilder.html" title=
"class in org.apache.commons.lang.builder"><B>PREV CLASS
</B></A>
55 <A HREF=
"../../../../../org/apache/commons/lang/builder/ReflectionToStringBuilder.html" title=
"class in org.apache.commons.lang.builder"><B>NEXT CLASS
</B></A></FONT></TD>
56 <TD BGCOLOR=
"white" CLASS=
"NavBarCell2"><FONT SIZE=
"-2">
57 <A HREF=
"../../../../../index.html" target=
"_top"><B>FRAMES
</B></A>
58 <A HREF=
"HashCodeBuilder.html" target=
"_top"><B>NO FRAMES
</B></A>
59 <SCRIPT type=
"text/javascript">
62 document.writeln('<A HREF="../../../../../allclasses-noframe.html"><B>All Classes</B></A>');
67 <A HREF=
"../../../../../allclasses-noframe.html"><B>All Classes
</B></A>
73 <TD VALIGN=
"top" CLASS=
"NavBarCell3"><FONT SIZE=
"-2">
74 SUMMARY:
NESTED
|
FIELD
|
<A HREF=
"#constructor_summary">CONSTR
</A> |
<A HREF=
"#method_summary">METHOD
</A></FONT></TD>
75 <TD VALIGN=
"top" CLASS=
"NavBarCell3"><FONT SIZE=
"-2">
76 DETAIL:
FIELD
|
<A HREF=
"#constructor_detail">CONSTR
</A> |
<A HREF=
"#method_detail">METHOD
</A></FONT></TD>
79 <A NAME=
"skip-navbar_top"></A>
80 <!-- ========= END OF TOP NAVBAR ========= -->
83 <!-- ======== START OF CLASS DATA ======== -->
86 org.apache.commons.lang.builder
</FONT>
88 Class HashCodeBuilder
</H2>
91 <IMG SRC=
"../../../../../resources/inherit.gif" ALT=
"extended by"><B>org.apache.commons.lang.builder.HashCodeBuilder
</B>
95 <DT>public class
<B>HashCodeBuilder
</B><DT>extends java.lang.Object
</DL>
99 Assists in implementing
<CODE>Object.hashCode()
</CODE> methods.
103 This class enables a good
<code>hashCode
</code> method to be built for any class. It follows the rules laid out in
104 the book
<a href=
"http://java.sun.com/docs/books/effective/index.html">Effective Java
</a> by Joshua Bloch. Writing a
105 good
<code>hashCode
</code> method is actually quite difficult. This class aims to simplify the process.
109 All relevant fields from the object should be included in the
<code>hashCode
</code> method. Derived fields may be
110 excluded. In general, any field used in the
<code>equals
</code> method must be used in the
<code>hashCode
</code>
115 To use this class write code as follows:
119 public class Person {
125 public int hashCode() {
126 // you pick a hard-coded, randomly chosen, non-zero, odd number
127 // ideally different for each class
128 return new HashCodeBuilder(
17,
37).
138 If required, the superclass
<code>hashCode()
</code> can be added using
<A HREF=
"../../../../../org/apache/commons/lang/builder/HashCodeBuilder.html#appendSuper(int)"><CODE>appendSuper(int)
</CODE></A>.
142 Alternatively, there is a method that uses reflection to determine the fields to test. Because these fields are
143 usually private, the method,
<code>reflectionHashCode
</code>, uses
<code>AccessibleObject.setAccessible
</code>
144 to change the visibility of the fields. This will fail under a security manager, unless the appropriate permissions
145 are set up correctly. It is also slower than testing explicitly.
149 A typical invocation for this method would look like:
153 public int hashCode() {
154 return HashCodeBuilder.reflectionHashCode(this);
161 <DT><B>Since:
</B></DT>
163 <DT><B>Version:
</B></DT>
164 <DD>$Id: HashCodeBuilder.java
564070 2007-
08-
09 01:
58:
11Z bayard $
</DD>
165 <DT><B>Author:
</B></DT>
166 <DD>Stephen Colebourne, Gary Gregory, Pete Gieser
</DD>
171 <!-- ======== NESTED CLASS SUMMARY ======== -->
174 <!-- =========== FIELD SUMMARY =========== -->
177 <!-- ======== CONSTRUCTOR SUMMARY ======== -->
179 <A NAME=
"constructor_summary"><!-- --></A>
180 <TABLE BORDER=
"1" WIDTH=
"100%" CELLPADDING=
"3" CELLSPACING=
"0" SUMMARY=
"">
181 <TR BGCOLOR=
"#CCCCFF" CLASS=
"TableHeadingColor">
182 <TD COLSPAN=
2><FONT SIZE=
"+2">
183 <B>Constructor Summary
</B></FONT></TD>
185 <TR BGCOLOR=
"white" CLASS=
"TableRowColor">
186 <TD><CODE><B><A HREF=
"../../../../../org/apache/commons/lang/builder/HashCodeBuilder.html#HashCodeBuilder()">HashCodeBuilder
</A></B>()
</CODE>
189
190 Uses two hard coded choices for the constants needed to build a
<code>hashCode
</code>.
</TD>
192 <TR BGCOLOR=
"white" CLASS=
"TableRowColor">
193 <TD><CODE><B><A HREF=
"../../../../../org/apache/commons/lang/builder/HashCodeBuilder.html#HashCodeBuilder(int, int)">HashCodeBuilder
</A></B>(int
initialNonZeroOddNumber,
194 int
multiplierNonZeroOddNumber)
</CODE>
197
198 Two randomly chosen, non-zero, odd numbers must be passed in.
</TD>
202 <!-- ========== METHOD SUMMARY =========== -->
204 <A NAME=
"method_summary"><!-- --></A>
205 <TABLE BORDER=
"1" WIDTH=
"100%" CELLPADDING=
"3" CELLSPACING=
"0" SUMMARY=
"">
206 <TR BGCOLOR=
"#CCCCFF" CLASS=
"TableHeadingColor">
207 <TD COLSPAN=
2><FONT SIZE=
"+2">
208 <B>Method Summary
</B></FONT></TD>
210 <TR BGCOLOR=
"white" CLASS=
"TableRowColor">
211 <TD ALIGN=
"right" VALIGN=
"top" WIDTH=
"1%"><FONT SIZE=
"-1">
212 <CODE> <A HREF=
"../../../../../org/apache/commons/lang/builder/HashCodeBuilder.html" title=
"class in org.apache.commons.lang.builder">HashCodeBuilder
</A></CODE></FONT></TD>
213 <TD><CODE><B><A HREF=
"../../../../../org/apache/commons/lang/builder/HashCodeBuilder.html#append(boolean)">append
</A></B>(boolean
value)
</CODE>
216
217 Append a
<code>hashCode
</code> for a
<code>boolean
</code>.
</TD>
219 <TR BGCOLOR=
"white" CLASS=
"TableRowColor">
220 <TD ALIGN=
"right" VALIGN=
"top" WIDTH=
"1%"><FONT SIZE=
"-1">
221 <CODE> <A HREF=
"../../../../../org/apache/commons/lang/builder/HashCodeBuilder.html" title=
"class in org.apache.commons.lang.builder">HashCodeBuilder
</A></CODE></FONT></TD>
222 <TD><CODE><B><A HREF=
"../../../../../org/apache/commons/lang/builder/HashCodeBuilder.html#append(boolean[])">append
</A></B>(boolean[]
array)
</CODE>
225
226 Append a
<code>hashCode
</code> for a
<code>boolean
</code> array.
</TD>
228 <TR BGCOLOR=
"white" CLASS=
"TableRowColor">
229 <TD ALIGN=
"right" VALIGN=
"top" WIDTH=
"1%"><FONT SIZE=
"-1">
230 <CODE> <A HREF=
"../../../../../org/apache/commons/lang/builder/HashCodeBuilder.html" title=
"class in org.apache.commons.lang.builder">HashCodeBuilder
</A></CODE></FONT></TD>
231 <TD><CODE><B><A HREF=
"../../../../../org/apache/commons/lang/builder/HashCodeBuilder.html#append(byte)">append
</A></B>(byte
value)
</CODE>
234
235 Append a
<code>hashCode
</code> for a
<code>byte
</code>.
</TD>
237 <TR BGCOLOR=
"white" CLASS=
"TableRowColor">
238 <TD ALIGN=
"right" VALIGN=
"top" WIDTH=
"1%"><FONT SIZE=
"-1">
239 <CODE> <A HREF=
"../../../../../org/apache/commons/lang/builder/HashCodeBuilder.html" title=
"class in org.apache.commons.lang.builder">HashCodeBuilder
</A></CODE></FONT></TD>
240 <TD><CODE><B><A HREF=
"../../../../../org/apache/commons/lang/builder/HashCodeBuilder.html#append(byte[])">append
</A></B>(byte[]
array)
</CODE>
243
244 Append a
<code>hashCode
</code> for a
<code>byte
</code> array.
</TD>
246 <TR BGCOLOR=
"white" CLASS=
"TableRowColor">
247 <TD ALIGN=
"right" VALIGN=
"top" WIDTH=
"1%"><FONT SIZE=
"-1">
248 <CODE> <A HREF=
"../../../../../org/apache/commons/lang/builder/HashCodeBuilder.html" title=
"class in org.apache.commons.lang.builder">HashCodeBuilder
</A></CODE></FONT></TD>
249 <TD><CODE><B><A HREF=
"../../../../../org/apache/commons/lang/builder/HashCodeBuilder.html#append(char)">append
</A></B>(char
value)
</CODE>
252
253 Append a
<code>hashCode
</code> for a
<code>char
</code>.
</TD>
255 <TR BGCOLOR=
"white" CLASS=
"TableRowColor">
256 <TD ALIGN=
"right" VALIGN=
"top" WIDTH=
"1%"><FONT SIZE=
"-1">
257 <CODE> <A HREF=
"../../../../../org/apache/commons/lang/builder/HashCodeBuilder.html" title=
"class in org.apache.commons.lang.builder">HashCodeBuilder
</A></CODE></FONT></TD>
258 <TD><CODE><B><A HREF=
"../../../../../org/apache/commons/lang/builder/HashCodeBuilder.html#append(char[])">append
</A></B>(char[]
array)
</CODE>
261
262 Append a
<code>hashCode
</code> for a
<code>char
</code> array.
</TD>
264 <TR BGCOLOR=
"white" CLASS=
"TableRowColor">
265 <TD ALIGN=
"right" VALIGN=
"top" WIDTH=
"1%"><FONT SIZE=
"-1">
266 <CODE> <A HREF=
"../../../../../org/apache/commons/lang/builder/HashCodeBuilder.html" title=
"class in org.apache.commons.lang.builder">HashCodeBuilder
</A></CODE></FONT></TD>
267 <TD><CODE><B><A HREF=
"../../../../../org/apache/commons/lang/builder/HashCodeBuilder.html#append(double)">append
</A></B>(double
value)
</CODE>
270
271 Append a
<code>hashCode
</code> for a
<code>double
</code>.
</TD>
273 <TR BGCOLOR=
"white" CLASS=
"TableRowColor">
274 <TD ALIGN=
"right" VALIGN=
"top" WIDTH=
"1%"><FONT SIZE=
"-1">
275 <CODE> <A HREF=
"../../../../../org/apache/commons/lang/builder/HashCodeBuilder.html" title=
"class in org.apache.commons.lang.builder">HashCodeBuilder
</A></CODE></FONT></TD>
276 <TD><CODE><B><A HREF=
"../../../../../org/apache/commons/lang/builder/HashCodeBuilder.html#append(double[])">append
</A></B>(double[]
array)
</CODE>
279
280 Append a
<code>hashCode
</code> for a
<code>double
</code> array.
</TD>
282 <TR BGCOLOR=
"white" CLASS=
"TableRowColor">
283 <TD ALIGN=
"right" VALIGN=
"top" WIDTH=
"1%"><FONT SIZE=
"-1">
284 <CODE> <A HREF=
"../../../../../org/apache/commons/lang/builder/HashCodeBuilder.html" title=
"class in org.apache.commons.lang.builder">HashCodeBuilder
</A></CODE></FONT></TD>
285 <TD><CODE><B><A HREF=
"../../../../../org/apache/commons/lang/builder/HashCodeBuilder.html#append(float)">append
</A></B>(float
value)
</CODE>
288
289 Append a
<code>hashCode
</code> for a
<code>float
</code>.
</TD>
291 <TR BGCOLOR=
"white" CLASS=
"TableRowColor">
292 <TD ALIGN=
"right" VALIGN=
"top" WIDTH=
"1%"><FONT SIZE=
"-1">
293 <CODE> <A HREF=
"../../../../../org/apache/commons/lang/builder/HashCodeBuilder.html" title=
"class in org.apache.commons.lang.builder">HashCodeBuilder
</A></CODE></FONT></TD>
294 <TD><CODE><B><A HREF=
"../../../../../org/apache/commons/lang/builder/HashCodeBuilder.html#append(float[])">append
</A></B>(float[]
array)
</CODE>
297
298 Append a
<code>hashCode
</code> for a
<code>float
</code> array.
</TD>
300 <TR BGCOLOR=
"white" CLASS=
"TableRowColor">
301 <TD ALIGN=
"right" VALIGN=
"top" WIDTH=
"1%"><FONT SIZE=
"-1">
302 <CODE> <A HREF=
"../../../../../org/apache/commons/lang/builder/HashCodeBuilder.html" title=
"class in org.apache.commons.lang.builder">HashCodeBuilder
</A></CODE></FONT></TD>
303 <TD><CODE><B><A HREF=
"../../../../../org/apache/commons/lang/builder/HashCodeBuilder.html#append(int)">append
</A></B>(int
value)
</CODE>
306
307 Append a
<code>hashCode
</code> for an
<code>int
</code>.
</TD>
309 <TR BGCOLOR=
"white" CLASS=
"TableRowColor">
310 <TD ALIGN=
"right" VALIGN=
"top" WIDTH=
"1%"><FONT SIZE=
"-1">
311 <CODE> <A HREF=
"../../../../../org/apache/commons/lang/builder/HashCodeBuilder.html" title=
"class in org.apache.commons.lang.builder">HashCodeBuilder
</A></CODE></FONT></TD>
312 <TD><CODE><B><A HREF=
"../../../../../org/apache/commons/lang/builder/HashCodeBuilder.html#append(int[])">append
</A></B>(int[]
array)
</CODE>
315
316 Append a
<code>hashCode
</code> for an
<code>int
</code> array.
</TD>
318 <TR BGCOLOR=
"white" CLASS=
"TableRowColor">
319 <TD ALIGN=
"right" VALIGN=
"top" WIDTH=
"1%"><FONT SIZE=
"-1">
320 <CODE> <A HREF=
"../../../../../org/apache/commons/lang/builder/HashCodeBuilder.html" title=
"class in org.apache.commons.lang.builder">HashCodeBuilder
</A></CODE></FONT></TD>
321 <TD><CODE><B><A HREF=
"../../../../../org/apache/commons/lang/builder/HashCodeBuilder.html#append(long)">append
</A></B>(long
value)
</CODE>
324
325 Append a
<code>hashCode
</code> for a
<code>long
</code>.
</TD>
327 <TR BGCOLOR=
"white" CLASS=
"TableRowColor">
328 <TD ALIGN=
"right" VALIGN=
"top" WIDTH=
"1%"><FONT SIZE=
"-1">
329 <CODE> <A HREF=
"../../../../../org/apache/commons/lang/builder/HashCodeBuilder.html" title=
"class in org.apache.commons.lang.builder">HashCodeBuilder
</A></CODE></FONT></TD>
330 <TD><CODE><B><A HREF=
"../../../../../org/apache/commons/lang/builder/HashCodeBuilder.html#append(long[])">append
</A></B>(long[]
array)
</CODE>
333
334 Append a
<code>hashCode
</code> for a
<code>long
</code> array.
</TD>
336 <TR BGCOLOR=
"white" CLASS=
"TableRowColor">
337 <TD ALIGN=
"right" VALIGN=
"top" WIDTH=
"1%"><FONT SIZE=
"-1">
338 <CODE> <A HREF=
"../../../../../org/apache/commons/lang/builder/HashCodeBuilder.html" title=
"class in org.apache.commons.lang.builder">HashCodeBuilder
</A></CODE></FONT></TD>
339 <TD><CODE><B><A HREF=
"../../../../../org/apache/commons/lang/builder/HashCodeBuilder.html#append(java.lang.Object)">append
</A></B>(java.lang.Object
object)
</CODE>
342
343 Append a
<code>hashCode
</code> for an
<code>Object
</code>.
</TD>
345 <TR BGCOLOR=
"white" CLASS=
"TableRowColor">
346 <TD ALIGN=
"right" VALIGN=
"top" WIDTH=
"1%"><FONT SIZE=
"-1">
347 <CODE> <A HREF=
"../../../../../org/apache/commons/lang/builder/HashCodeBuilder.html" title=
"class in org.apache.commons.lang.builder">HashCodeBuilder
</A></CODE></FONT></TD>
348 <TD><CODE><B><A HREF=
"../../../../../org/apache/commons/lang/builder/HashCodeBuilder.html#append(java.lang.Object[])">append
</A></B>(java.lang.Object[]
array)
</CODE>
351
352 Append a
<code>hashCode
</code> for an
<code>Object
</code> array.
</TD>
354 <TR BGCOLOR=
"white" CLASS=
"TableRowColor">
355 <TD ALIGN=
"right" VALIGN=
"top" WIDTH=
"1%"><FONT SIZE=
"-1">
356 <CODE> <A HREF=
"../../../../../org/apache/commons/lang/builder/HashCodeBuilder.html" title=
"class in org.apache.commons.lang.builder">HashCodeBuilder
</A></CODE></FONT></TD>
357 <TD><CODE><B><A HREF=
"../../../../../org/apache/commons/lang/builder/HashCodeBuilder.html#append(short)">append
</A></B>(short
value)
</CODE>
360
361 Append a
<code>hashCode
</code> for a
<code>short
</code>.
</TD>
363 <TR BGCOLOR=
"white" CLASS=
"TableRowColor">
364 <TD ALIGN=
"right" VALIGN=
"top" WIDTH=
"1%"><FONT SIZE=
"-1">
365 <CODE> <A HREF=
"../../../../../org/apache/commons/lang/builder/HashCodeBuilder.html" title=
"class in org.apache.commons.lang.builder">HashCodeBuilder
</A></CODE></FONT></TD>
366 <TD><CODE><B><A HREF=
"../../../../../org/apache/commons/lang/builder/HashCodeBuilder.html#append(short[])">append
</A></B>(short[]
array)
</CODE>
369
370 Append a
<code>hashCode
</code> for a
<code>short
</code> array.
</TD>
372 <TR BGCOLOR=
"white" CLASS=
"TableRowColor">
373 <TD ALIGN=
"right" VALIGN=
"top" WIDTH=
"1%"><FONT SIZE=
"-1">
374 <CODE> <A HREF=
"../../../../../org/apache/commons/lang/builder/HashCodeBuilder.html" title=
"class in org.apache.commons.lang.builder">HashCodeBuilder
</A></CODE></FONT></TD>
375 <TD><CODE><B><A HREF=
"../../../../../org/apache/commons/lang/builder/HashCodeBuilder.html#appendSuper(int)">appendSuper
</A></B>(int
superHashCode)
</CODE>
378
379 Adds the result of super.hashCode() to this builder.
</TD>
381 <TR BGCOLOR=
"white" CLASS=
"TableRowColor">
382 <TD ALIGN=
"right" VALIGN=
"top" WIDTH=
"1%"><FONT SIZE=
"-1">
383 <CODE>static
int
</CODE></FONT></TD>
384 <TD><CODE><B><A HREF=
"../../../../../org/apache/commons/lang/builder/HashCodeBuilder.html#reflectionHashCode(int, int, java.lang.Object)">reflectionHashCode
</A></B>(int
initialNonZeroOddNumber,
385 int
multiplierNonZeroOddNumber,
386 java.lang.Object
object)
</CODE>
389
390 This method uses reflection to build a valid hash code.
</TD>
392 <TR BGCOLOR=
"white" CLASS=
"TableRowColor">
393 <TD ALIGN=
"right" VALIGN=
"top" WIDTH=
"1%"><FONT SIZE=
"-1">
394 <CODE>static
int
</CODE></FONT></TD>
395 <TD><CODE><B><A HREF=
"../../../../../org/apache/commons/lang/builder/HashCodeBuilder.html#reflectionHashCode(int, int, java.lang.Object, boolean)">reflectionHashCode
</A></B>(int
initialNonZeroOddNumber,
396 int
multiplierNonZeroOddNumber,
397 java.lang.Object
object,
398 boolean
testTransients)
</CODE>
401
402 This method uses reflection to build a valid hash code.
</TD>
404 <TR BGCOLOR=
"white" CLASS=
"TableRowColor">
405 <TD ALIGN=
"right" VALIGN=
"top" WIDTH=
"1%"><FONT SIZE=
"-1">
406 <CODE>static
int
</CODE></FONT></TD>
407 <TD><CODE><B><A HREF=
"../../../../../org/apache/commons/lang/builder/HashCodeBuilder.html#reflectionHashCode(int, int, java.lang.Object, boolean, java.lang.Class)">reflectionHashCode
</A></B>(int
initialNonZeroOddNumber,
408 int
multiplierNonZeroOddNumber,
409 java.lang.Object
object,
410 boolean
testTransients,
411 java.lang.Class
reflectUpToClass)
</CODE>
414 Calls
<A HREF=
"../../../../../org/apache/commons/lang/builder/HashCodeBuilder.html#reflectionHashCode(int, int, java.lang.Object, boolean, java.lang.Class, java.lang.String[])"><CODE>reflectionHashCode(int, int, Object, boolean, Class, String[])
</CODE></A> with excludeFields set to
415 <code>null
</code>.
</TD>
417 <TR BGCOLOR=
"white" CLASS=
"TableRowColor">
418 <TD ALIGN=
"right" VALIGN=
"top" WIDTH=
"1%"><FONT SIZE=
"-1">
419 <CODE>static
int
</CODE></FONT></TD>
420 <TD><CODE><B><A HREF=
"../../../../../org/apache/commons/lang/builder/HashCodeBuilder.html#reflectionHashCode(int, int, java.lang.Object, boolean, java.lang.Class, java.lang.String[])">reflectionHashCode
</A></B>(int
initialNonZeroOddNumber,
421 int
multiplierNonZeroOddNumber,
422 java.lang.Object
object,
423 boolean
testTransients,
424 java.lang.Class
reflectUpToClass,
425 java.lang.String[]
excludeFields)
</CODE>
428
429 This method uses reflection to build a valid hash code.
</TD>
431 <TR BGCOLOR=
"white" CLASS=
"TableRowColor">
432 <TD ALIGN=
"right" VALIGN=
"top" WIDTH=
"1%"><FONT SIZE=
"-1">
433 <CODE>static
int
</CODE></FONT></TD>
434 <TD><CODE><B><A HREF=
"../../../../../org/apache/commons/lang/builder/HashCodeBuilder.html#reflectionHashCode(java.lang.Object)">reflectionHashCode
</A></B>(java.lang.Object
object)
</CODE>
437
438 This method uses reflection to build a valid hash code.
</TD>
440 <TR BGCOLOR=
"white" CLASS=
"TableRowColor">
441 <TD ALIGN=
"right" VALIGN=
"top" WIDTH=
"1%"><FONT SIZE=
"-1">
442 <CODE>static
int
</CODE></FONT></TD>
443 <TD><CODE><B><A HREF=
"../../../../../org/apache/commons/lang/builder/HashCodeBuilder.html#reflectionHashCode(java.lang.Object, boolean)">reflectionHashCode
</A></B>(java.lang.Object
object,
444 boolean
testTransients)
</CODE>
447
448 This method uses reflection to build a valid hash code.
</TD>
450 <TR BGCOLOR=
"white" CLASS=
"TableRowColor">
451 <TD ALIGN=
"right" VALIGN=
"top" WIDTH=
"1%"><FONT SIZE=
"-1">
452 <CODE>static
int
</CODE></FONT></TD>
453 <TD><CODE><B><A HREF=
"../../../../../org/apache/commons/lang/builder/HashCodeBuilder.html#reflectionHashCode(java.lang.Object, java.util.Collection)">reflectionHashCode
</A></B>(java.lang.Object
object,
454 java.util.Collection
excludeFields)
</CODE>
457
458 This method uses reflection to build a valid hash code.
</TD>
460 <TR BGCOLOR=
"white" CLASS=
"TableRowColor">
461 <TD ALIGN=
"right" VALIGN=
"top" WIDTH=
"1%"><FONT SIZE=
"-1">
462 <CODE>static
int
</CODE></FONT></TD>
463 <TD><CODE><B><A HREF=
"../../../../../org/apache/commons/lang/builder/HashCodeBuilder.html#reflectionHashCode(java.lang.Object, java.lang.String[])">reflectionHashCode
</A></B>(java.lang.Object
object,
464 java.lang.String[]
excludeFields)
</CODE>
467
468 This method uses reflection to build a valid hash code.
</TD>
470 <TR BGCOLOR=
"white" CLASS=
"TableRowColor">
471 <TD ALIGN=
"right" VALIGN=
"top" WIDTH=
"1%"><FONT SIZE=
"-1">
472 <CODE> int
</CODE></FONT></TD>
473 <TD><CODE><B><A HREF=
"../../../../../org/apache/commons/lang/builder/HashCodeBuilder.html#toHashCode()">toHashCode
</A></B>()
</CODE>
476
477 Return the computed
<code>hashCode
</code>.
</TD>
480 <A NAME=
"methods_inherited_from_class_java.lang.Object"><!-- --></A>
481 <TABLE BORDER=
"1" WIDTH=
"100%" CELLPADDING=
"3" CELLSPACING=
"0" SUMMARY=
"">
482 <TR BGCOLOR=
"#EEEEFF" CLASS=
"TableSubHeadingColor">
483 <TD><B>Methods inherited from class java.lang.Object
</B></TD>
485 <TR BGCOLOR=
"white" CLASS=
"TableRowColor">
486 <TD><CODE>clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
</CODE></TD>
492 <!-- ============ FIELD DETAIL =========== -->
495 <!-- ========= CONSTRUCTOR DETAIL ======== -->
497 <A NAME=
"constructor_detail"><!-- --></A>
498 <TABLE BORDER=
"1" WIDTH=
"100%" CELLPADDING=
"3" CELLSPACING=
"0" SUMMARY=
"">
499 <TR BGCOLOR=
"#CCCCFF" CLASS=
"TableHeadingColor">
500 <TD COLSPAN=
1><FONT SIZE=
"+2">
501 <B>Constructor Detail
</B></FONT></TD>
505 <A NAME=
"HashCodeBuilder()"><!-- --></A><H3>
508 public
<B>HashCodeBuilder
</B>()
</PRE>
511 Uses two hard coded choices for the constants needed to build a
<code>hashCode
</code>.
517 <A NAME=
"HashCodeBuilder(int, int)"><!-- --></A><H3>
520 public
<B>HashCodeBuilder
</B>(int
initialNonZeroOddNumber,
521 int
multiplierNonZeroOddNumber)
</PRE>
524 Two randomly chosen, non-zero, odd numbers must be passed in. Ideally these should be different for each class,
525 however this is not vital.
529 Prime numbers are preferred, especially for the multiplier.
532 <DT><B>Parameters:
</B><DD><CODE>initialNonZeroOddNumber
</CODE> - a non-zero, odd number used as the initial value
<DD><CODE>multiplierNonZeroOddNumber
</CODE> - a non-zero, odd number used as the multiplier
534 <DD><CODE>java.lang.IllegalArgumentException
</CODE> - if the number is zero or even
</DL>
536 <!-- ============ METHOD DETAIL ========== -->
538 <A NAME=
"method_detail"><!-- --></A>
539 <TABLE BORDER=
"1" WIDTH=
"100%" CELLPADDING=
"3" CELLSPACING=
"0" SUMMARY=
"">
540 <TR BGCOLOR=
"#CCCCFF" CLASS=
"TableHeadingColor">
541 <TD COLSPAN=
1><FONT SIZE=
"+2">
542 <B>Method Detail
</B></FONT></TD>
546 <A NAME=
"reflectionHashCode(int, int, java.lang.Object)"><!-- --></A><H3>
547 reflectionHashCode
</H3>
549 public static int
<B>reflectionHashCode
</B>(int
initialNonZeroOddNumber,
550 int
multiplierNonZeroOddNumber,
551 java.lang.Object
object)
</PRE>
554 This method uses reflection to build a valid hash code.
558 It uses
<code>AccessibleObject.setAccessible
</code> to gain access to private fields. This means that it will
559 throw a security exception if run under a security manager, if the permissions are not set up correctly. It is
560 also not as efficient as testing explicitly.
564 Transient members will be not be used, as they are likely derived fields, and not part of the value of the
569 Static fields will not be tested. Superclass fields will be included.
573 Two randomly chosen, non-zero, odd numbers must be passed in. Ideally these should be different for each class,
574 however this is not vital. Prime numbers are preferred, especially for the multiplier.
578 <DT><B>Parameters:
</B><DD><CODE>initialNonZeroOddNumber
</CODE> - a non-zero, odd number used as the initial value
<DD><CODE>multiplierNonZeroOddNumber
</CODE> - a non-zero, odd number used as the multiplier
<DD><CODE>object
</CODE> - the Object to create a
<code>hashCode
</code> for
579 <DT><B>Returns:
</B><DD>int hash code
581 <DD><CODE>java.lang.IllegalArgumentException
</CODE> - if the Object is
<code>null
</code>
582 <DD><CODE>java.lang.IllegalArgumentException
</CODE> - if the number is zero or even
</DL>
587 <A NAME=
"reflectionHashCode(int, int, java.lang.Object, boolean)"><!-- --></A><H3>
588 reflectionHashCode
</H3>
590 public static int
<B>reflectionHashCode
</B>(int
initialNonZeroOddNumber,
591 int
multiplierNonZeroOddNumber,
592 java.lang.Object
object,
593 boolean
testTransients)
</PRE>
596 This method uses reflection to build a valid hash code.
600 It uses
<code>AccessibleObject.setAccessible
</code> to gain access to private fields. This means that it will
601 throw a security exception if run under a security manager, if the permissions are not set up correctly. It is
602 also not as efficient as testing explicitly.
606 If the TestTransients parameter is set to
<code>true
</code>, transient members will be tested, otherwise they
607 are ignored, as they are likely derived fields, and not part of the value of the
<code>Object
</code>.
611 Static fields will not be tested. Superclass fields will be included.
615 Two randomly chosen, non-zero, odd numbers must be passed in. Ideally these should be different for each class,
616 however this is not vital. Prime numbers are preferred, especially for the multiplier.
620 <DT><B>Parameters:
</B><DD><CODE>initialNonZeroOddNumber
</CODE> - a non-zero, odd number used as the initial value
<DD><CODE>multiplierNonZeroOddNumber
</CODE> - a non-zero, odd number used as the multiplier
<DD><CODE>object
</CODE> - the Object to create a
<code>hashCode
</code> for
<DD><CODE>testTransients
</CODE> - whether to include transient fields
621 <DT><B>Returns:
</B><DD>int hash code
623 <DD><CODE>java.lang.IllegalArgumentException
</CODE> - if the Object is
<code>null
</code>
624 <DD><CODE>java.lang.IllegalArgumentException
</CODE> - if the number is zero or even
</DL>
629 <A NAME=
"reflectionHashCode(int, int, java.lang.Object, boolean, java.lang.Class)"><!-- --></A><H3>
630 reflectionHashCode
</H3>
632 public static int
<B>reflectionHashCode
</B>(int
initialNonZeroOddNumber,
633 int
multiplierNonZeroOddNumber,
634 java.lang.Object
object,
635 boolean
testTransients,
636 java.lang.Class
reflectUpToClass)
</PRE>
638 <DD>Calls
<A HREF=
"../../../../../org/apache/commons/lang/builder/HashCodeBuilder.html#reflectionHashCode(int, int, java.lang.Object, boolean, java.lang.Class, java.lang.String[])"><CODE>reflectionHashCode(int, int, Object, boolean, Class, String[])
</CODE></A> with excludeFields set to
642 <DT><B>Parameters:
</B><DD><CODE>initialNonZeroOddNumber
</CODE> - a non-zero, odd number used as the initial value
<DD><CODE>multiplierNonZeroOddNumber
</CODE> - a non-zero, odd number used as the multiplier
<DD><CODE>object
</CODE> - the Object to create a
<code>hashCode
</code> for
<DD><CODE>testTransients
</CODE> - whether to include transient fields
<DD><CODE>reflectUpToClass
</CODE> - the superclass to reflect up to (inclusive), may be
<code>null
</code>
643 <DT><B>Returns:
</B><DD>int hash code
</DL>
648 <A NAME=
"reflectionHashCode(int, int, java.lang.Object, boolean, java.lang.Class, java.lang.String[])"><!-- --></A><H3>
649 reflectionHashCode
</H3>
651 public static int
<B>reflectionHashCode
</B>(int
initialNonZeroOddNumber,
652 int
multiplierNonZeroOddNumber,
653 java.lang.Object
object,
654 boolean
testTransients,
655 java.lang.Class
reflectUpToClass,
656 java.lang.String[]
excludeFields)
</PRE>
659 This method uses reflection to build a valid hash code.
663 It uses
<code>AccessibleObject.setAccessible
</code> to gain access to private fields. This means that it will
664 throw a security exception if run under a security manager, if the permissions are not set up correctly. It is
665 also not as efficient as testing explicitly.
669 If the TestTransients parameter is set to
<code>true
</code>, transient members will be tested, otherwise they
670 are ignored, as they are likely derived fields, and not part of the value of the
<code>Object
</code>.
674 Static fields will not be included. Superclass fields will be included up to and including the specified
675 superclass. A null superclass is treated as java.lang.Object.
679 Two randomly chosen, non-zero, odd numbers must be passed in. Ideally these should be different for each class,
680 however this is not vital. Prime numbers are preferred, especially for the multiplier.
684 <DT><B>Parameters:
</B><DD><CODE>initialNonZeroOddNumber
</CODE> - a non-zero, odd number used as the initial value
<DD><CODE>multiplierNonZeroOddNumber
</CODE> - a non-zero, odd number used as the multiplier
<DD><CODE>object
</CODE> - the Object to create a
<code>hashCode
</code> for
<DD><CODE>testTransients
</CODE> - whether to include transient fields
<DD><CODE>reflectUpToClass
</CODE> - the superclass to reflect up to (inclusive), may be
<code>null
</code><DD><CODE>excludeFields
</CODE> - array of field names to exclude from use in calculation of hash code
685 <DT><B>Returns:
</B><DD>int hash code
687 <DD><CODE>java.lang.IllegalArgumentException
</CODE> - if the Object is
<code>null
</code>
688 <DD><CODE>java.lang.IllegalArgumentException
</CODE> - if the number is zero or even
<DT><B>Since:
</B></DT>
695 <A NAME=
"reflectionHashCode(java.lang.Object)"><!-- --></A><H3>
696 reflectionHashCode
</H3>
698 public static int
<B>reflectionHashCode
</B>(java.lang.Object
object)
</PRE>
701 This method uses reflection to build a valid hash code.
705 This constructor uses two hard coded choices for the constants needed to build a hash code.
709 It uses
<code>AccessibleObject.setAccessible
</code> to gain access to private fields. This means that it will
710 throw a security exception if run under a security manager, if the permissions are not set up correctly. It is
711 also not as efficient as testing explicitly.
715 Transient members will be not be used, as they are likely derived fields, and not part of the value of the
720 Static fields will not be tested. Superclass fields will be included.
724 <DT><B>Parameters:
</B><DD><CODE>object
</CODE> - the Object to create a
<code>hashCode
</code> for
725 <DT><B>Returns:
</B><DD>int hash code
727 <DD><CODE>java.lang.IllegalArgumentException
</CODE> - if the object is
<code>null
</code></DL>
732 <A NAME=
"reflectionHashCode(java.lang.Object, boolean)"><!-- --></A><H3>
733 reflectionHashCode
</H3>
735 public static int
<B>reflectionHashCode
</B>(java.lang.Object
object,
736 boolean
testTransients)
</PRE>
739 This method uses reflection to build a valid hash code.
743 This constructor uses two hard coded choices for the constants needed to build a hash code.
747 It uses
<code>AccessibleObject.setAccessible
</code> to gain access to private fields. This means that it will
748 throw a security exception if run under a security manager, if the permissions are not set up correctly. It is
749 also not as efficient as testing explicitly.
753 If the TestTransients parameter is set to
<code>true
</code>, transient members will be tested, otherwise they
754 are ignored, as they are likely derived fields, and not part of the value of the
<code>Object
</code>.
758 Static fields will not be tested. Superclass fields will be included.
762 <DT><B>Parameters:
</B><DD><CODE>object
</CODE> - the Object to create a
<code>hashCode
</code> for
<DD><CODE>testTransients
</CODE> - whether to include transient fields
763 <DT><B>Returns:
</B><DD>int hash code
765 <DD><CODE>java.lang.IllegalArgumentException
</CODE> - if the object is
<code>null
</code></DL>
770 <A NAME=
"reflectionHashCode(java.lang.Object, java.util.Collection)"><!-- --></A><H3>
771 reflectionHashCode
</H3>
773 public static int
<B>reflectionHashCode
</B>(java.lang.Object
object,
774 java.util.Collection
excludeFields)
</PRE>
777 This method uses reflection to build a valid hash code.
781 This constructor uses two hard coded choices for the constants needed to build a hash code.
785 It uses
<code>AccessibleObject.setAccessible
</code> to gain access to private fields. This means that it will
786 throw a security exception if run under a security manager, if the permissions are not set up correctly. It is
787 also not as efficient as testing explicitly.
791 Transient members will be not be used, as they are likely derived fields, and not part of the value of the
796 Static fields will not be tested. Superclass fields will be included.
800 <DT><B>Parameters:
</B><DD><CODE>object
</CODE> - the Object to create a
<code>hashCode
</code> for
<DD><CODE>excludeFields
</CODE> - Collection of String field names to exclude from use in calculation of hash code
801 <DT><B>Returns:
</B><DD>int hash code
803 <DD><CODE>java.lang.IllegalArgumentException
</CODE> - if the object is
<code>null
</code></DL>
808 <A NAME=
"reflectionHashCode(java.lang.Object, java.lang.String[])"><!-- --></A><H3>
809 reflectionHashCode
</H3>
811 public static int
<B>reflectionHashCode
</B>(java.lang.Object
object,
812 java.lang.String[]
excludeFields)
</PRE>
815 This method uses reflection to build a valid hash code.
819 This constructor uses two hard coded choices for the constants needed to build a hash code.
823 It uses
<code>AccessibleObject.setAccessible
</code> to gain access to private fields. This means that it will
824 throw a security exception if run under a security manager, if the permissions are not set up correctly. It is
825 also not as efficient as testing explicitly.
829 Transient members will be not be used, as they are likely derived fields, and not part of the value of the
834 Static fields will not be tested. Superclass fields will be included.
838 <DT><B>Parameters:
</B><DD><CODE>object
</CODE> - the Object to create a
<code>hashCode
</code> for
<DD><CODE>excludeFields
</CODE> - array of field names to exclude from use in calculation of hash code
839 <DT><B>Returns:
</B><DD>int hash code
841 <DD><CODE>java.lang.IllegalArgumentException
</CODE> - if the object is
<code>null
</code></DL>
846 <A NAME=
"append(boolean)"><!-- --></A><H3>
849 public
<A HREF=
"../../../../../org/apache/commons/lang/builder/HashCodeBuilder.html" title=
"class in org.apache.commons.lang.builder">HashCodeBuilder
</A> <B>append
</B>(boolean
value)
</PRE>
852 Append a
<code>hashCode
</code> for a
<code>boolean
</code>.
855 This adds
<code>iConstant *
1</code> to the
<code>hashCode
</code> and not a
<code>1231</code> or
856 <code>1237</code> as done in java.lang.Boolean. This is in accordance with the
<quote>Effective Java
</quote>
861 <DT><B>Parameters:
</B><DD><CODE>value
</CODE> - the boolean to add to the
<code>hashCode
</code>
862 <DT><B>Returns:
</B><DD>this
</DL>
867 <A NAME=
"append(boolean[])"><!-- --></A><H3>
870 public
<A HREF=
"../../../../../org/apache/commons/lang/builder/HashCodeBuilder.html" title=
"class in org.apache.commons.lang.builder">HashCodeBuilder
</A> <B>append
</B>(boolean[]
array)
</PRE>
873 Append a
<code>hashCode
</code> for a
<code>boolean
</code> array.
877 <DT><B>Parameters:
</B><DD><CODE>array
</CODE> - the array to add to the
<code>hashCode
</code>
878 <DT><B>Returns:
</B><DD>this
</DL>
883 <A NAME=
"append(byte)"><!-- --></A><H3>
886 public
<A HREF=
"../../../../../org/apache/commons/lang/builder/HashCodeBuilder.html" title=
"class in org.apache.commons.lang.builder">HashCodeBuilder
</A> <B>append
</B>(byte
value)
</PRE>
889 Append a
<code>hashCode
</code> for a
<code>byte
</code>.
893 <DT><B>Parameters:
</B><DD><CODE>value
</CODE> - the byte to add to the
<code>hashCode
</code>
894 <DT><B>Returns:
</B><DD>this
</DL>
899 <A NAME=
"append(byte[])"><!-- --></A><H3>
902 public
<A HREF=
"../../../../../org/apache/commons/lang/builder/HashCodeBuilder.html" title=
"class in org.apache.commons.lang.builder">HashCodeBuilder
</A> <B>append
</B>(byte[]
array)
</PRE>
905 Append a
<code>hashCode
</code> for a
<code>byte
</code> array.
909 <DT><B>Parameters:
</B><DD><CODE>array
</CODE> - the array to add to the
<code>hashCode
</code>
910 <DT><B>Returns:
</B><DD>this
</DL>
915 <A NAME=
"append(char)"><!-- --></A><H3>
918 public
<A HREF=
"../../../../../org/apache/commons/lang/builder/HashCodeBuilder.html" title=
"class in org.apache.commons.lang.builder">HashCodeBuilder
</A> <B>append
</B>(char
value)
</PRE>
921 Append a
<code>hashCode
</code> for a
<code>char
</code>.
925 <DT><B>Parameters:
</B><DD><CODE>value
</CODE> - the char to add to the
<code>hashCode
</code>
926 <DT><B>Returns:
</B><DD>this
</DL>
931 <A NAME=
"append(char[])"><!-- --></A><H3>
934 public
<A HREF=
"../../../../../org/apache/commons/lang/builder/HashCodeBuilder.html" title=
"class in org.apache.commons.lang.builder">HashCodeBuilder
</A> <B>append
</B>(char[]
array)
</PRE>
937 Append a
<code>hashCode
</code> for a
<code>char
</code> array.
941 <DT><B>Parameters:
</B><DD><CODE>array
</CODE> - the array to add to the
<code>hashCode
</code>
942 <DT><B>Returns:
</B><DD>this
</DL>
947 <A NAME=
"append(double)"><!-- --></A><H3>
950 public
<A HREF=
"../../../../../org/apache/commons/lang/builder/HashCodeBuilder.html" title=
"class in org.apache.commons.lang.builder">HashCodeBuilder
</A> <B>append
</B>(double
value)
</PRE>
953 Append a
<code>hashCode
</code> for a
<code>double
</code>.
957 <DT><B>Parameters:
</B><DD><CODE>value
</CODE> - the double to add to the
<code>hashCode
</code>
958 <DT><B>Returns:
</B><DD>this
</DL>
963 <A NAME=
"append(double[])"><!-- --></A><H3>
966 public
<A HREF=
"../../../../../org/apache/commons/lang/builder/HashCodeBuilder.html" title=
"class in org.apache.commons.lang.builder">HashCodeBuilder
</A> <B>append
</B>(double[]
array)
</PRE>
969 Append a
<code>hashCode
</code> for a
<code>double
</code> array.
973 <DT><B>Parameters:
</B><DD><CODE>array
</CODE> - the array to add to the
<code>hashCode
</code>
974 <DT><B>Returns:
</B><DD>this
</DL>
979 <A NAME=
"append(float)"><!-- --></A><H3>
982 public
<A HREF=
"../../../../../org/apache/commons/lang/builder/HashCodeBuilder.html" title=
"class in org.apache.commons.lang.builder">HashCodeBuilder
</A> <B>append
</B>(float
value)
</PRE>
985 Append a
<code>hashCode
</code> for a
<code>float
</code>.
989 <DT><B>Parameters:
</B><DD><CODE>value
</CODE> - the float to add to the
<code>hashCode
</code>
990 <DT><B>Returns:
</B><DD>this
</DL>
995 <A NAME=
"append(float[])"><!-- --></A><H3>
998 public
<A HREF=
"../../../../../org/apache/commons/lang/builder/HashCodeBuilder.html" title=
"class in org.apache.commons.lang.builder">HashCodeBuilder
</A> <B>append
</B>(float[]
array)
</PRE>
1001 Append a
<code>hashCode
</code> for a
<code>float
</code> array.
1005 <DT><B>Parameters:
</B><DD><CODE>array
</CODE> - the array to add to the
<code>hashCode
</code>
1006 <DT><B>Returns:
</B><DD>this
</DL>
1011 <A NAME=
"append(int)"><!-- --></A><H3>
1014 public
<A HREF=
"../../../../../org/apache/commons/lang/builder/HashCodeBuilder.html" title=
"class in org.apache.commons.lang.builder">HashCodeBuilder
</A> <B>append
</B>(int
value)
</PRE>
1017 Append a
<code>hashCode
</code> for an
<code>int
</code>.
1021 <DT><B>Parameters:
</B><DD><CODE>value
</CODE> - the int to add to the
<code>hashCode
</code>
1022 <DT><B>Returns:
</B><DD>this
</DL>
1027 <A NAME=
"append(int[])"><!-- --></A><H3>
1030 public
<A HREF=
"../../../../../org/apache/commons/lang/builder/HashCodeBuilder.html" title=
"class in org.apache.commons.lang.builder">HashCodeBuilder
</A> <B>append
</B>(int[]
array)
</PRE>
1033 Append a
<code>hashCode
</code> for an
<code>int
</code> array.
1037 <DT><B>Parameters:
</B><DD><CODE>array
</CODE> - the array to add to the
<code>hashCode
</code>
1038 <DT><B>Returns:
</B><DD>this
</DL>
1043 <A NAME=
"append(long)"><!-- --></A><H3>
1046 public
<A HREF=
"../../../../../org/apache/commons/lang/builder/HashCodeBuilder.html" title=
"class in org.apache.commons.lang.builder">HashCodeBuilder
</A> <B>append
</B>(long
value)
</PRE>
1049 Append a
<code>hashCode
</code> for a
<code>long
</code>.
1054 <DT><B>Parameters:
</B><DD><CODE>value
</CODE> - the long to add to the
<code>hashCode
</code>
1055 <DT><B>Returns:
</B><DD>this
</DL>
1060 <A NAME=
"append(long[])"><!-- --></A><H3>
1063 public
<A HREF=
"../../../../../org/apache/commons/lang/builder/HashCodeBuilder.html" title=
"class in org.apache.commons.lang.builder">HashCodeBuilder
</A> <B>append
</B>(long[]
array)
</PRE>
1066 Append a
<code>hashCode
</code> for a
<code>long
</code> array.
1070 <DT><B>Parameters:
</B><DD><CODE>array
</CODE> - the array to add to the
<code>hashCode
</code>
1071 <DT><B>Returns:
</B><DD>this
</DL>
1076 <A NAME=
"append(java.lang.Object)"><!-- --></A><H3>
1079 public
<A HREF=
"../../../../../org/apache/commons/lang/builder/HashCodeBuilder.html" title=
"class in org.apache.commons.lang.builder">HashCodeBuilder
</A> <B>append
</B>(java.lang.Object
object)
</PRE>
1082 Append a
<code>hashCode
</code> for an
<code>Object
</code>.
1086 <DT><B>Parameters:
</B><DD><CODE>object
</CODE> - the Object to add to the
<code>hashCode
</code>
1087 <DT><B>Returns:
</B><DD>this
</DL>
1092 <A NAME=
"append(java.lang.Object[])"><!-- --></A><H3>
1095 public
<A HREF=
"../../../../../org/apache/commons/lang/builder/HashCodeBuilder.html" title=
"class in org.apache.commons.lang.builder">HashCodeBuilder
</A> <B>append
</B>(java.lang.Object[]
array)
</PRE>
1098 Append a
<code>hashCode
</code> for an
<code>Object
</code> array.
1102 <DT><B>Parameters:
</B><DD><CODE>array
</CODE> - the array to add to the
<code>hashCode
</code>
1103 <DT><B>Returns:
</B><DD>this
</DL>
1108 <A NAME=
"append(short)"><!-- --></A><H3>
1111 public
<A HREF=
"../../../../../org/apache/commons/lang/builder/HashCodeBuilder.html" title=
"class in org.apache.commons.lang.builder">HashCodeBuilder
</A> <B>append
</B>(short
value)
</PRE>
1114 Append a
<code>hashCode
</code> for a
<code>short
</code>.
1118 <DT><B>Parameters:
</B><DD><CODE>value
</CODE> - the short to add to the
<code>hashCode
</code>
1119 <DT><B>Returns:
</B><DD>this
</DL>
1124 <A NAME=
"append(short[])"><!-- --></A><H3>
1127 public
<A HREF=
"../../../../../org/apache/commons/lang/builder/HashCodeBuilder.html" title=
"class in org.apache.commons.lang.builder">HashCodeBuilder
</A> <B>append
</B>(short[]
array)
</PRE>
1130 Append a
<code>hashCode
</code> for a
<code>short
</code> array.
1134 <DT><B>Parameters:
</B><DD><CODE>array
</CODE> - the array to add to the
<code>hashCode
</code>
1135 <DT><B>Returns:
</B><DD>this
</DL>
1140 <A NAME=
"appendSuper(int)"><!-- --></A><H3>
1143 public
<A HREF=
"../../../../../org/apache/commons/lang/builder/HashCodeBuilder.html" title=
"class in org.apache.commons.lang.builder">HashCodeBuilder
</A> <B>appendSuper
</B>(int
superHashCode)
</PRE>
1146 Adds the result of super.hashCode() to this builder.
1150 <DT><B>Parameters:
</B><DD><CODE>superHashCode
</CODE> - the result of calling
<code>super.hashCode()
</code>
1151 <DT><B>Returns:
</B><DD>this HashCodeBuilder, used to chain calls.
<DT><B>Since:
</B></DT>
1158 <A NAME=
"toHashCode()"><!-- --></A><H3>
1161 public int
<B>toHashCode
</B>()
</PRE>
1164 Return the computed
<code>hashCode
</code>.
1169 <DT><B>Returns:
</B><DD><code>hashCode
</code> based on the fields appended
</DL>
1172 <!-- ========= END OF CLASS DATA ========= -->
1176 <!-- ======= START OF BOTTOM NAVBAR ====== -->
1177 <A NAME=
"navbar_bottom"><!-- --></A>
1178 <A HREF=
"#skip-navbar_bottom" title=
"Skip navigation links"></A>
1179 <TABLE BORDER=
"0" WIDTH=
"100%" CELLPADDING=
"1" CELLSPACING=
"0" SUMMARY=
"">
1181 <TD COLSPAN=
3 BGCOLOR=
"#EEEEFF" CLASS=
"NavBarCell1">
1182 <A NAME=
"navbar_bottom_firstrow"><!-- --></A>
1183 <TABLE BORDER=
"0" CELLPADDING=
"0" CELLSPACING=
"3" SUMMARY=
"">
1184 <TR ALIGN=
"center" VALIGN=
"top">
1185 <TD BGCOLOR=
"#EEEEFF" CLASS=
"NavBarCell1"> <A HREF=
"../../../../../overview-summary.html"><FONT CLASS=
"NavBarFont1"><B>Overview
</B></FONT></A> </TD>
1186 <TD BGCOLOR=
"#EEEEFF" CLASS=
"NavBarCell1"> <A HREF=
"package-summary.html"><FONT CLASS=
"NavBarFont1"><B>Package
</B></FONT></A> </TD>
1187 <TD BGCOLOR=
"#FFFFFF" CLASS=
"NavBarCell1Rev"> <FONT CLASS=
"NavBarFont1Rev"><B>Class
</B></FONT> </TD>
1188 <TD BGCOLOR=
"#EEEEFF" CLASS=
"NavBarCell1"> <A HREF=
"class-use/HashCodeBuilder.html"><FONT CLASS=
"NavBarFont1"><B>Use
</B></FONT></A> </TD>
1189 <TD BGCOLOR=
"#EEEEFF" CLASS=
"NavBarCell1"> <A HREF=
"package-tree.html"><FONT CLASS=
"NavBarFont1"><B>Tree
</B></FONT></A> </TD>
1190 <TD BGCOLOR=
"#EEEEFF" CLASS=
"NavBarCell1"> <A HREF=
"../../../../../deprecated-list.html"><FONT CLASS=
"NavBarFont1"><B>Deprecated
</B></FONT></A> </TD>
1191 <TD BGCOLOR=
"#EEEEFF" CLASS=
"NavBarCell1"> <A HREF=
"../../../../../index-all.html"><FONT CLASS=
"NavBarFont1"><B>Index
</B></FONT></A> </TD>
1192 <TD BGCOLOR=
"#EEEEFF" CLASS=
"NavBarCell1"> <A HREF=
"../../../../../help-doc.html"><FONT CLASS=
"NavBarFont1"><B>Help
</B></FONT></A> </TD>
1196 <TD ALIGN=
"right" VALIGN=
"top" ROWSPAN=
3><EM>
1202 <TD BGCOLOR=
"white" CLASS=
"NavBarCell2"><FONT SIZE=
"-2">
1203 <A HREF=
"../../../../../org/apache/commons/lang/builder/EqualsBuilder.html" title=
"class in org.apache.commons.lang.builder"><B>PREV CLASS
</B></A>
1204 <A HREF=
"../../../../../org/apache/commons/lang/builder/ReflectionToStringBuilder.html" title=
"class in org.apache.commons.lang.builder"><B>NEXT CLASS
</B></A></FONT></TD>
1205 <TD BGCOLOR=
"white" CLASS=
"NavBarCell2"><FONT SIZE=
"-2">
1206 <A HREF=
"../../../../../index.html" target=
"_top"><B>FRAMES
</B></A>
1207 <A HREF=
"HashCodeBuilder.html" target=
"_top"><B>NO FRAMES
</B></A>
1208 <SCRIPT type=
"text/javascript">
1211 document.writeln('<A HREF="../../../../../allclasses-noframe.html"><B>All Classes</B></A>');
1216 <A HREF=
"../../../../../allclasses-noframe.html"><B>All Classes
</B></A>
1222 <TD VALIGN=
"top" CLASS=
"NavBarCell3"><FONT SIZE=
"-2">
1223 SUMMARY:
NESTED
|
FIELD
|
<A HREF=
"#constructor_summary">CONSTR
</A> |
<A HREF=
"#method_summary">METHOD
</A></FONT></TD>
1224 <TD VALIGN=
"top" CLASS=
"NavBarCell3"><FONT SIZE=
"-2">
1225 DETAIL:
FIELD
|
<A HREF=
"#constructor_detail">CONSTR
</A> |
<A HREF=
"#method_detail">METHOD
</A></FONT></TD>
1228 <A NAME=
"skip-navbar_bottom"></A>
1229 <!-- ======== END OF BOTTOM NAVBAR ======= -->
1232 Copyright ©
2001-
2008 <a href=
"http://www.apache.org/">The Apache Software Foundation
</a>. All Rights Reserved.