a whole bunch of stuff
[ephemerata.git] / Toady / lib / commons-lang-2.4 / apidocs / org / apache / commons / lang / BitField.html
blob88dde94d07bbaaa8fbaaf837c56f0d372efa2037
1 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
2 <!--NewPage-->
3 <HTML>
4 <HEAD>
5 <!-- Generated by javadoc (build 1.4.2_16) on Sat Mar 15 20:43:47 PDT 2008 -->
6 <META http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
7 <TITLE>
8 BitField (Commons Lang 2.4 API)
9 </TITLE>
11 <META NAME="keywords" CONTENT="org.apache.commons.lang.BitField 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="BitField (Commons Lang 2.4 API)";
20 </SCRIPT>
22 </HEAD>
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="">
31 <TR>
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>&nbsp;</TD>
37 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>
38 <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT>&nbsp;</TD>
39 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="class-use/BitField.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A>&nbsp;</TD>
40 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
41 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
42 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>
43 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>
44 </TR>
45 </TABLE>
46 </TD>
47 <TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
48 </EM>
49 </TD>
50 </TR>
52 <TR>
53 <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
54 &nbsp;<A HREF="../../../../org/apache/commons/lang/ArrayUtils.html" title="class in org.apache.commons.lang"><B>PREV CLASS</B></A>&nbsp;
55 &nbsp;<A HREF="../../../../org/apache/commons/lang/BooleanUtils.html" title="class in org.apache.commons.lang"><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> &nbsp;
58 &nbsp;<A HREF="BitField.html" target="_top"><B>NO FRAMES</B></A> &nbsp;
59 &nbsp;<SCRIPT type="text/javascript">
60 <!--
61 if(window==top) {
62 document.writeln('<A HREF="../../../../allclasses-noframe.html"><B>All Classes</B></A>');
64 //-->
65 </SCRIPT>
66 <NOSCRIPT>
67 <A HREF="../../../../allclasses-noframe.html"><B>All Classes</B></A>
68 </NOSCRIPT>
70 </FONT></TD>
71 </TR>
72 <TR>
73 <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
74 SUMMARY:&nbsp;NESTED&nbsp;|&nbsp;FIELD&nbsp;|&nbsp;<A HREF="#constructor_summary">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD>
75 <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
76 DETAIL:&nbsp;FIELD&nbsp;|&nbsp;<A HREF="#constructor_detail">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_detail">METHOD</A></FONT></TD>
77 </TR>
78 </TABLE>
79 <A NAME="skip-navbar_top"></A>
80 <!-- ========= END OF TOP NAVBAR ========= -->
82 <HR>
83 <!-- ======== START OF CLASS DATA ======== -->
84 <H2>
85 <FONT SIZE="-1">
86 org.apache.commons.lang</FONT>
87 <BR>
88 Class BitField</H2>
89 <PRE>
90 java.lang.Object
91 <IMG SRC="../../../../resources/inherit.gif" ALT="extended by"><B>org.apache.commons.lang.BitField</B>
92 </PRE>
93 <HR>
94 <DL>
95 <DT>public class <B>BitField</B><DT>extends java.lang.Object</DL>
97 <P>
98 <p>Operations on bit-mapped fields.</p>
99 <P>
102 <DL>
103 <DT><B>Since:</B></DT>
104 <DD>2.0</DD>
105 <DT><B>Version:</B></DT>
106 <DD>$Id: BitField.java 437554 2006-08-28 06:21:41Z bayard $</DD>
107 <DT><B>Author:</B></DT>
108 <DD>Apache Jakarta POI, Scott Sanders (sanders at apache dot org), Marc Johnson (mjohnson at apache dot org), Andrew C. Oliver (acoliver at apache dot org), Stephen Colebourne, Pete Gieser, Gary Gregory</DD>
109 </DL>
110 <HR>
113 <!-- ======== NESTED CLASS SUMMARY ======== -->
116 <!-- =========== FIELD SUMMARY =========== -->
119 <!-- ======== CONSTRUCTOR SUMMARY ======== -->
121 <A NAME="constructor_summary"><!-- --></A>
122 <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
123 <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
124 <TD COLSPAN=2><FONT SIZE="+2">
125 <B>Constructor Summary</B></FONT></TD>
126 </TR>
127 <TR BGCOLOR="white" CLASS="TableRowColor">
128 <TD><CODE><B><A HREF="../../../../org/apache/commons/lang/BitField.html#BitField(int)">BitField</A></B>(int&nbsp;mask)</CODE>
130 <BR>
131 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Creates a BitField instance.</TD>
132 </TR>
133 </TABLE>
134 &nbsp;
135 <!-- ========== METHOD SUMMARY =========== -->
137 <A NAME="method_summary"><!-- --></A>
138 <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
139 <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
140 <TD COLSPAN=2><FONT SIZE="+2">
141 <B>Method Summary</B></FONT></TD>
142 </TR>
143 <TR BGCOLOR="white" CLASS="TableRowColor">
144 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
145 <CODE>&nbsp;int</CODE></FONT></TD>
146 <TD><CODE><B><A HREF="../../../../org/apache/commons/lang/BitField.html#clear(int)">clear</A></B>(int&nbsp;holder)</CODE>
148 <BR>
149 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Clears the bits.</TD>
150 </TR>
151 <TR BGCOLOR="white" CLASS="TableRowColor">
152 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
153 <CODE>&nbsp;byte</CODE></FONT></TD>
154 <TD><CODE><B><A HREF="../../../../org/apache/commons/lang/BitField.html#clearByte(byte)">clearByte</A></B>(byte&nbsp;holder)</CODE>
156 <BR>
157 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Clears the bits.</TD>
158 </TR>
159 <TR BGCOLOR="white" CLASS="TableRowColor">
160 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
161 <CODE>&nbsp;short</CODE></FONT></TD>
162 <TD><CODE><B><A HREF="../../../../org/apache/commons/lang/BitField.html#clearShort(short)">clearShort</A></B>(short&nbsp;holder)</CODE>
164 <BR>
165 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Clears the bits.</TD>
166 </TR>
167 <TR BGCOLOR="white" CLASS="TableRowColor">
168 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
169 <CODE>&nbsp;int</CODE></FONT></TD>
170 <TD><CODE><B><A HREF="../../../../org/apache/commons/lang/BitField.html#getRawValue(int)">getRawValue</A></B>(int&nbsp;holder)</CODE>
172 <BR>
173 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Obtains the value for the specified BitField, unshifted.</TD>
174 </TR>
175 <TR BGCOLOR="white" CLASS="TableRowColor">
176 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
177 <CODE>&nbsp;short</CODE></FONT></TD>
178 <TD><CODE><B><A HREF="../../../../org/apache/commons/lang/BitField.html#getShortRawValue(short)">getShortRawValue</A></B>(short&nbsp;holder)</CODE>
180 <BR>
181 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Obtains the value for the specified BitField, unshifted.</TD>
182 </TR>
183 <TR BGCOLOR="white" CLASS="TableRowColor">
184 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
185 <CODE>&nbsp;short</CODE></FONT></TD>
186 <TD><CODE><B><A HREF="../../../../org/apache/commons/lang/BitField.html#getShortValue(short)">getShortValue</A></B>(short&nbsp;holder)</CODE>
188 <BR>
189 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Obtains the value for the specified BitField, appropriately
190 shifted right, as a short.</TD>
191 </TR>
192 <TR BGCOLOR="white" CLASS="TableRowColor">
193 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
194 <CODE>&nbsp;int</CODE></FONT></TD>
195 <TD><CODE><B><A HREF="../../../../org/apache/commons/lang/BitField.html#getValue(int)">getValue</A></B>(int&nbsp;holder)</CODE>
197 <BR>
198 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Obtains the value for the specified BitField, appropriately
199 shifted right.</TD>
200 </TR>
201 <TR BGCOLOR="white" CLASS="TableRowColor">
202 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
203 <CODE>&nbsp;boolean</CODE></FONT></TD>
204 <TD><CODE><B><A HREF="../../../../org/apache/commons/lang/BitField.html#isAllSet(int)">isAllSet</A></B>(int&nbsp;holder)</CODE>
206 <BR>
207 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns whether all of the bits are set or not.</TD>
208 </TR>
209 <TR BGCOLOR="white" CLASS="TableRowColor">
210 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
211 <CODE>&nbsp;boolean</CODE></FONT></TD>
212 <TD><CODE><B><A HREF="../../../../org/apache/commons/lang/BitField.html#isSet(int)">isSet</A></B>(int&nbsp;holder)</CODE>
214 <BR>
215 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns whether the field is set or not.</TD>
216 </TR>
217 <TR BGCOLOR="white" CLASS="TableRowColor">
218 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
219 <CODE>&nbsp;int</CODE></FONT></TD>
220 <TD><CODE><B><A HREF="../../../../org/apache/commons/lang/BitField.html#set(int)">set</A></B>(int&nbsp;holder)</CODE>
222 <BR>
223 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Sets the bits.</TD>
224 </TR>
225 <TR BGCOLOR="white" CLASS="TableRowColor">
226 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
227 <CODE>&nbsp;int</CODE></FONT></TD>
228 <TD><CODE><B><A HREF="../../../../org/apache/commons/lang/BitField.html#setBoolean(int, boolean)">setBoolean</A></B>(int&nbsp;holder,
229 boolean&nbsp;flag)</CODE>
231 <BR>
232 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Sets a boolean BitField.</TD>
233 </TR>
234 <TR BGCOLOR="white" CLASS="TableRowColor">
235 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
236 <CODE>&nbsp;byte</CODE></FONT></TD>
237 <TD><CODE><B><A HREF="../../../../org/apache/commons/lang/BitField.html#setByte(byte)">setByte</A></B>(byte&nbsp;holder)</CODE>
239 <BR>
240 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Sets the bits.</TD>
241 </TR>
242 <TR BGCOLOR="white" CLASS="TableRowColor">
243 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
244 <CODE>&nbsp;byte</CODE></FONT></TD>
245 <TD><CODE><B><A HREF="../../../../org/apache/commons/lang/BitField.html#setByteBoolean(byte, boolean)">setByteBoolean</A></B>(byte&nbsp;holder,
246 boolean&nbsp;flag)</CODE>
248 <BR>
249 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Sets a boolean BitField.</TD>
250 </TR>
251 <TR BGCOLOR="white" CLASS="TableRowColor">
252 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
253 <CODE>&nbsp;short</CODE></FONT></TD>
254 <TD><CODE><B><A HREF="../../../../org/apache/commons/lang/BitField.html#setShort(short)">setShort</A></B>(short&nbsp;holder)</CODE>
256 <BR>
257 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Sets the bits.</TD>
258 </TR>
259 <TR BGCOLOR="white" CLASS="TableRowColor">
260 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
261 <CODE>&nbsp;short</CODE></FONT></TD>
262 <TD><CODE><B><A HREF="../../../../org/apache/commons/lang/BitField.html#setShortBoolean(short, boolean)">setShortBoolean</A></B>(short&nbsp;holder,
263 boolean&nbsp;flag)</CODE>
265 <BR>
266 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Sets a boolean BitField.</TD>
267 </TR>
268 <TR BGCOLOR="white" CLASS="TableRowColor">
269 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
270 <CODE>&nbsp;short</CODE></FONT></TD>
271 <TD><CODE><B><A HREF="../../../../org/apache/commons/lang/BitField.html#setShortValue(short, short)">setShortValue</A></B>(short&nbsp;holder,
272 short&nbsp;value)</CODE>
274 <BR>
275 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Replaces the bits with new values.</TD>
276 </TR>
277 <TR BGCOLOR="white" CLASS="TableRowColor">
278 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
279 <CODE>&nbsp;int</CODE></FONT></TD>
280 <TD><CODE><B><A HREF="../../../../org/apache/commons/lang/BitField.html#setValue(int, int)">setValue</A></B>(int&nbsp;holder,
281 int&nbsp;value)</CODE>
283 <BR>
284 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Replaces the bits with new values.</TD>
285 </TR>
286 </TABLE>
287 &nbsp;<A NAME="methods_inherited_from_class_java.lang.Object"><!-- --></A>
288 <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
289 <TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
290 <TD><B>Methods inherited from class java.lang.Object</B></TD>
291 </TR>
292 <TR BGCOLOR="white" CLASS="TableRowColor">
293 <TD><CODE>clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait</CODE></TD>
294 </TR>
295 </TABLE>
296 &nbsp;
299 <!-- ============ FIELD DETAIL =========== -->
302 <!-- ========= CONSTRUCTOR DETAIL ======== -->
304 <A NAME="constructor_detail"><!-- --></A>
305 <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
306 <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
307 <TD COLSPAN=1><FONT SIZE="+2">
308 <B>Constructor Detail</B></FONT></TD>
309 </TR>
310 </TABLE>
312 <A NAME="BitField(int)"><!-- --></A><H3>
313 BitField</H3>
314 <PRE>
315 public <B>BitField</B>(int&nbsp;mask)</PRE>
316 <DL>
317 <DD><p>Creates a BitField instance.</p>
319 <DT><B>Parameters:</B><DD><CODE>mask</CODE> - the mask specifying which bits apply to this
320 BitField. Bits that are set in this mask are the bits
321 that this BitField operates on</DL>
323 <!-- ============ METHOD DETAIL ========== -->
325 <A NAME="method_detail"><!-- --></A>
326 <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
327 <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
328 <TD COLSPAN=1><FONT SIZE="+2">
329 <B>Method Detail</B></FONT></TD>
330 </TR>
331 </TABLE>
333 <A NAME="getValue(int)"><!-- --></A><H3>
334 getValue</H3>
335 <PRE>
336 public int <B>getValue</B>(int&nbsp;holder)</PRE>
337 <DL>
338 <DD><p>Obtains the value for the specified BitField, appropriately
339 shifted right.</p>
341 <p>Many users of a BitField will want to treat the specified
342 bits as an int value, and will not want to be aware that the
343 value is stored as a BitField (and so shifted left so many
344 bits).</p>
346 <DD><DL>
347 <DT><B>Parameters:</B><DD><CODE>holder</CODE> - the int data containing the bits we're interested
349 <DT><B>Returns:</B><DD>the selected bits, shifted right appropriately<DT><B>See Also:</B><DD><A HREF="../../../../org/apache/commons/lang/BitField.html#setValue(int, int)"><CODE>setValue(int,int)</CODE></A></DL>
350 </DD>
351 </DL>
352 <HR>
354 <A NAME="getShortValue(short)"><!-- --></A><H3>
355 getShortValue</H3>
356 <PRE>
357 public short <B>getShortValue</B>(short&nbsp;holder)</PRE>
358 <DL>
359 <DD><p>Obtains the value for the specified BitField, appropriately
360 shifted right, as a short.</p>
362 <p>Many users of a BitField will want to treat the specified
363 bits as an int value, and will not want to be aware that the
364 value is stored as a BitField (and so shifted left so many
365 bits).</p>
367 <DD><DL>
368 <DT><B>Parameters:</B><DD><CODE>holder</CODE> - the short data containing the bits we're
369 interested in
370 <DT><B>Returns:</B><DD>the selected bits, shifted right appropriately<DT><B>See Also:</B><DD><A HREF="../../../../org/apache/commons/lang/BitField.html#setShortValue(short, short)"><CODE>setShortValue(short,short)</CODE></A></DL>
371 </DD>
372 </DL>
373 <HR>
375 <A NAME="getRawValue(int)"><!-- --></A><H3>
376 getRawValue</H3>
377 <PRE>
378 public int <B>getRawValue</B>(int&nbsp;holder)</PRE>
379 <DL>
380 <DD><p>Obtains the value for the specified BitField, unshifted.</p>
382 <DD><DL>
383 <DT><B>Parameters:</B><DD><CODE>holder</CODE> - the int data containing the bits we're
384 interested in
385 <DT><B>Returns:</B><DD>the selected bits</DL>
386 </DD>
387 </DL>
388 <HR>
390 <A NAME="getShortRawValue(short)"><!-- --></A><H3>
391 getShortRawValue</H3>
392 <PRE>
393 public short <B>getShortRawValue</B>(short&nbsp;holder)</PRE>
394 <DL>
395 <DD><p>Obtains the value for the specified BitField, unshifted.</p>
397 <DD><DL>
398 <DT><B>Parameters:</B><DD><CODE>holder</CODE> - the short data containing the bits we're
399 interested in
400 <DT><B>Returns:</B><DD>the selected bits</DL>
401 </DD>
402 </DL>
403 <HR>
405 <A NAME="isSet(int)"><!-- --></A><H3>
406 isSet</H3>
407 <PRE>
408 public boolean <B>isSet</B>(int&nbsp;holder)</PRE>
409 <DL>
410 <DD><p>Returns whether the field is set or not.</p>
412 <p>This is most commonly used for a single-bit field, which is
413 often used to represent a boolean value; the results of using
414 it for a multi-bit field is to determine whether *any* of its
415 bits are set.</p>
417 <DD><DL>
418 <DT><B>Parameters:</B><DD><CODE>holder</CODE> - the int data containing the bits we're interested
420 <DT><B>Returns:</B><DD><code>true</code> if any of the bits are set,
421 else <code>false</code></DL>
422 </DD>
423 </DL>
424 <HR>
426 <A NAME="isAllSet(int)"><!-- --></A><H3>
427 isAllSet</H3>
428 <PRE>
429 public boolean <B>isAllSet</B>(int&nbsp;holder)</PRE>
430 <DL>
431 <DD><p>Returns whether all of the bits are set or not.</p>
433 <p>This is a stricter test than <A HREF="../../../../org/apache/commons/lang/BitField.html#isSet(int)"><CODE>isSet(int)</CODE></A>,
434 in that all of the bits in a multi-bit set must be set
435 for this method to return <code>true</code>.</p>
437 <DD><DL>
438 <DT><B>Parameters:</B><DD><CODE>holder</CODE> - the int data containing the bits we're
439 interested in
440 <DT><B>Returns:</B><DD><code>true</code> if all of the bits are set,
441 else <code>false</code></DL>
442 </DD>
443 </DL>
444 <HR>
446 <A NAME="setValue(int, int)"><!-- --></A><H3>
447 setValue</H3>
448 <PRE>
449 public int <B>setValue</B>(int&nbsp;holder,
450 int&nbsp;value)</PRE>
451 <DL>
452 <DD><p>Replaces the bits with new values.</p>
454 <DD><DL>
455 <DT><B>Parameters:</B><DD><CODE>holder</CODE> - the int data containing the bits we're
456 interested in<DD><CODE>value</CODE> - the new value for the specified bits
457 <DT><B>Returns:</B><DD>the value of holder with the bits from the value
458 parameter replacing the old bits<DT><B>See Also:</B><DD><A HREF="../../../../org/apache/commons/lang/BitField.html#getValue(int)"><CODE>getValue(int)</CODE></A></DL>
459 </DD>
460 </DL>
461 <HR>
463 <A NAME="setShortValue(short, short)"><!-- --></A><H3>
464 setShortValue</H3>
465 <PRE>
466 public short <B>setShortValue</B>(short&nbsp;holder,
467 short&nbsp;value)</PRE>
468 <DL>
469 <DD><p>Replaces the bits with new values.</p>
471 <DD><DL>
472 <DT><B>Parameters:</B><DD><CODE>holder</CODE> - the short data containing the bits we're
473 interested in<DD><CODE>value</CODE> - the new value for the specified bits
474 <DT><B>Returns:</B><DD>the value of holder with the bits from the value
475 parameter replacing the old bits<DT><B>See Also:</B><DD><A HREF="../../../../org/apache/commons/lang/BitField.html#getShortValue(short)"><CODE>getShortValue(short)</CODE></A></DL>
476 </DD>
477 </DL>
478 <HR>
480 <A NAME="clear(int)"><!-- --></A><H3>
481 clear</H3>
482 <PRE>
483 public int <B>clear</B>(int&nbsp;holder)</PRE>
484 <DL>
485 <DD><p>Clears the bits.</p>
487 <DD><DL>
488 <DT><B>Parameters:</B><DD><CODE>holder</CODE> - the int data containing the bits we're
489 interested in
490 <DT><B>Returns:</B><DD>the value of holder with the specified bits cleared
491 (set to <code>0</code>)</DL>
492 </DD>
493 </DL>
494 <HR>
496 <A NAME="clearShort(short)"><!-- --></A><H3>
497 clearShort</H3>
498 <PRE>
499 public short <B>clearShort</B>(short&nbsp;holder)</PRE>
500 <DL>
501 <DD><p>Clears the bits.</p>
503 <DD><DL>
504 <DT><B>Parameters:</B><DD><CODE>holder</CODE> - the short data containing the bits we're
505 interested in
506 <DT><B>Returns:</B><DD>the value of holder with the specified bits cleared
507 (set to <code>0</code>)</DL>
508 </DD>
509 </DL>
510 <HR>
512 <A NAME="clearByte(byte)"><!-- --></A><H3>
513 clearByte</H3>
514 <PRE>
515 public byte <B>clearByte</B>(byte&nbsp;holder)</PRE>
516 <DL>
517 <DD><p>Clears the bits.</p>
519 <DD><DL>
520 <DT><B>Parameters:</B><DD><CODE>holder</CODE> - the byte data containing the bits we're
521 interested in
522 <DT><B>Returns:</B><DD>the value of holder with the specified bits cleared
523 (set to <code>0</code>)</DL>
524 </DD>
525 </DL>
526 <HR>
528 <A NAME="set(int)"><!-- --></A><H3>
529 set</H3>
530 <PRE>
531 public int <B>set</B>(int&nbsp;holder)</PRE>
532 <DL>
533 <DD><p>Sets the bits.</p>
535 <DD><DL>
536 <DT><B>Parameters:</B><DD><CODE>holder</CODE> - the int data containing the bits we're
537 interested in
538 <DT><B>Returns:</B><DD>the value of holder with the specified bits set
539 to <code>1</code></DL>
540 </DD>
541 </DL>
542 <HR>
544 <A NAME="setShort(short)"><!-- --></A><H3>
545 setShort</H3>
546 <PRE>
547 public short <B>setShort</B>(short&nbsp;holder)</PRE>
548 <DL>
549 <DD><p>Sets the bits.</p>
551 <DD><DL>
552 <DT><B>Parameters:</B><DD><CODE>holder</CODE> - the short data containing the bits we're
553 interested in
554 <DT><B>Returns:</B><DD>the value of holder with the specified bits set
555 to <code>1</code></DL>
556 </DD>
557 </DL>
558 <HR>
560 <A NAME="setByte(byte)"><!-- --></A><H3>
561 setByte</H3>
562 <PRE>
563 public byte <B>setByte</B>(byte&nbsp;holder)</PRE>
564 <DL>
565 <DD><p>Sets the bits.</p>
567 <DD><DL>
568 <DT><B>Parameters:</B><DD><CODE>holder</CODE> - the byte data containing the bits we're
569 interested in
570 <DT><B>Returns:</B><DD>the value of holder with the specified bits set
571 to <code>1</code></DL>
572 </DD>
573 </DL>
574 <HR>
576 <A NAME="setBoolean(int, boolean)"><!-- --></A><H3>
577 setBoolean</H3>
578 <PRE>
579 public int <B>setBoolean</B>(int&nbsp;holder,
580 boolean&nbsp;flag)</PRE>
581 <DL>
582 <DD><p>Sets a boolean BitField.</p>
584 <DD><DL>
585 <DT><B>Parameters:</B><DD><CODE>holder</CODE> - the int data containing the bits we're
586 interested in<DD><CODE>flag</CODE> - indicating whether to set or clear the bits
587 <DT><B>Returns:</B><DD>the value of holder with the specified bits set or
588 cleared</DL>
589 </DD>
590 </DL>
591 <HR>
593 <A NAME="setShortBoolean(short, boolean)"><!-- --></A><H3>
594 setShortBoolean</H3>
595 <PRE>
596 public short <B>setShortBoolean</B>(short&nbsp;holder,
597 boolean&nbsp;flag)</PRE>
598 <DL>
599 <DD><p>Sets a boolean BitField.</p>
601 <DD><DL>
602 <DT><B>Parameters:</B><DD><CODE>holder</CODE> - the short data containing the bits we're
603 interested in<DD><CODE>flag</CODE> - indicating whether to set or clear the bits
604 <DT><B>Returns:</B><DD>the value of holder with the specified bits set or
605 cleared</DL>
606 </DD>
607 </DL>
608 <HR>
610 <A NAME="setByteBoolean(byte, boolean)"><!-- --></A><H3>
611 setByteBoolean</H3>
612 <PRE>
613 public byte <B>setByteBoolean</B>(byte&nbsp;holder,
614 boolean&nbsp;flag)</PRE>
615 <DL>
616 <DD><p>Sets a boolean BitField.</p>
618 <DD><DL>
619 <DT><B>Parameters:</B><DD><CODE>holder</CODE> - the byte data containing the bits we're
620 interested in<DD><CODE>flag</CODE> - indicating whether to set or clear the bits
621 <DT><B>Returns:</B><DD>the value of holder with the specified bits set or
622 cleared</DL>
623 </DD>
624 </DL>
625 <!-- ========= END OF CLASS DATA ========= -->
626 <HR>
629 <!-- ======= START OF BOTTOM NAVBAR ====== -->
630 <A NAME="navbar_bottom"><!-- --></A>
631 <A HREF="#skip-navbar_bottom" title="Skip navigation links"></A>
632 <TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
633 <TR>
634 <TD COLSPAN=3 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
635 <A NAME="navbar_bottom_firstrow"><!-- --></A>
636 <TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
637 <TR ALIGN="center" VALIGN="top">
638 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>
639 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>
640 <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT>&nbsp;</TD>
641 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="class-use/BitField.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A>&nbsp;</TD>
642 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
643 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
644 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>
645 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>
646 </TR>
647 </TABLE>
648 </TD>
649 <TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
650 </EM>
651 </TD>
652 </TR>
654 <TR>
655 <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
656 &nbsp;<A HREF="../../../../org/apache/commons/lang/ArrayUtils.html" title="class in org.apache.commons.lang"><B>PREV CLASS</B></A>&nbsp;
657 &nbsp;<A HREF="../../../../org/apache/commons/lang/BooleanUtils.html" title="class in org.apache.commons.lang"><B>NEXT CLASS</B></A></FONT></TD>
658 <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
659 <A HREF="../../../../index.html" target="_top"><B>FRAMES</B></A> &nbsp;
660 &nbsp;<A HREF="BitField.html" target="_top"><B>NO FRAMES</B></A> &nbsp;
661 &nbsp;<SCRIPT type="text/javascript">
662 <!--
663 if(window==top) {
664 document.writeln('<A HREF="../../../../allclasses-noframe.html"><B>All Classes</B></A>');
666 //-->
667 </SCRIPT>
668 <NOSCRIPT>
669 <A HREF="../../../../allclasses-noframe.html"><B>All Classes</B></A>
670 </NOSCRIPT>
672 </FONT></TD>
673 </TR>
674 <TR>
675 <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
676 SUMMARY:&nbsp;NESTED&nbsp;|&nbsp;FIELD&nbsp;|&nbsp;<A HREF="#constructor_summary">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD>
677 <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
678 DETAIL:&nbsp;FIELD&nbsp;|&nbsp;<A HREF="#constructor_detail">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_detail">METHOD</A></FONT></TD>
679 </TR>
680 </TABLE>
681 <A NAME="skip-navbar_bottom"></A>
682 <!-- ======== END OF BOTTOM NAVBAR ======= -->
684 <HR>
685 Copyright © 2001-2008 <a href="http://www.apache.org/">The Apache Software Foundation</a>. All Rights Reserved.
686 </BODY>
687 </HTML>