<!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.5.0_09) on Tue Aug 07 16:57:34 CEST 2007 --> <TITLE> QBitArray </TITLE> <META NAME="keywords" CONTENT="com.trolltech.qt.core.QBitArray class"> <LINK REL ="stylesheet" TYPE="text/css" HREF="../../../../stylesheet.css" TITLE="Style"> <SCRIPT type="text/javascript"> function windowTitle() { parent.document.title="QBitArray"; } </SCRIPT> <NOSCRIPT> </NOSCRIPT> </HEAD> <BODY BGCOLOR="white" onload="windowTitle();"> <!-- ========= 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="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</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="../../../../com/trolltech/qt/core/QBasicTimer.html" title="class in com.trolltech.qt.core"><B>PREV CLASS</B></A> <A HREF="../../../../com/trolltech/qt/core/QBuffer.html" title="class in com.trolltech.qt.core"><B>NEXT CLASS</B></A></FONT></TD> <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> <A HREF="../../../../index.html?com/trolltech/qt/core/QBitArray.html" target="_top"><B>FRAMES</B></A> <A HREF="QBitArray.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: <A HREF="#nested_classes_inherited_from_class_com.trolltech.qt.QSignalEmitter">NESTED</A> | FIELD | <A HREF="#constructor_summary">CONSTR</A> | <A HREF="#method_summary">METHOD</A></FONT></TD> <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> DETAIL: FIELD | <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"> com.trolltech.qt.core</FONT> <BR> Class QBitArray</H2> <PRE> java.lang.Object <IMG SRC="../../../../resources/inherit.gif" ALT="extended by "><A HREF="../../../../com/trolltech/qt/QSignalEmitter.html" title="class in com.trolltech.qt">com.trolltech.qt.QSignalEmitter</A> <IMG SRC="../../../../resources/inherit.gif" ALT="extended by "><A HREF="../../../../com/trolltech/qt/QtJambiObject.html" title="class in com.trolltech.qt">com.trolltech.qt.QtJambiObject</A> <IMG SRC="../../../../resources/inherit.gif" ALT="extended by "><B>com.trolltech.qt.core.QBitArray</B> </PRE> <DL> <DT><B>All Implemented Interfaces:</B> <DD><A HREF="../../../../com/trolltech/qt/QtJambiInterface.html" title="interface in com.trolltech.qt">QtJambiInterface</A></DD> </DL> <HR> <DL> <DT><PRE>public class <B>QBitArray</B><DT>extends <A HREF="../../../../com/trolltech/qt/QtJambiObject.html" title="class in com.trolltech.qt">QtJambiObject</A></DL> </PRE> <P> <p>The <a href="QBitArray.html#QBitArray()"><tt>QBitArray</tt></a> class provides an array of bits.</p> <p>A <a href="QBitArray.html#QBitArray()"><tt>QBitArray</tt></a> is an array that gives access to individual bits and provides operators (AND</tt>, OR</tt>, XOR</tt>, and NOT</tt>) that work on entire arrays of bits. It uses implicit sharing</tt> (copy-on-write) to reduce memory usage and to avoid the needless copying of data.</p> <p>The following code constructs a <a href="QBitArray.html#QBitArray()"><tt>QBitArray</tt></a> containing 200 bits initialized to false (0):</p> <pre> QBitArray ba(200);</pre> <p>To initialize the bits to true, either pass <tt>true</tt> as second argument to the constructor, or call <a href="QBitArray.html#fill(boolean, int)"><tt>fill</tt></a> later on.</p> <p><a href="QBitArray.html#QBitArray()"><tt>QBitArray</tt></a> uses 0-based indexes, just like C++ arrays. To access the bit at a particular index position, you can use operator[](). On non-const bit arrays, operator[]() returns a reference to a bit that can be used on the left side of an assignment. For example:</p> <pre> QBitArray ba; ba.resize(3); ba[0] = true; ba[1] = false; ba[2] = true;</pre> <p>For technical reasons, it is more efficient to use <a href="QBitArray.html#testBit(int)"><tt>testBit</tt></a> and <a href="QBitArray.html#setBit(int, boolean)"><tt>setBit</tt></a> to access bits in the array than operator[](). For example:</p> <pre> QBitArray ba(3); ba.setBit(0, true); ba.setBit(1, false); ba.setBit(2, true);</pre> <p><a href="QBitArray.html#QBitArray()"><tt>QBitArray</tt></a> supports <tt>&</tt> (AND</tt>), <tt>|</tt> (OR</tt>), <tt>^</tt> (XOR</tt>), <tt>~</tt> (NOT</tt>), as well as <tt>&=</tt>, <tt>|=</tt>, and <tt>^=</tt>. These operators work in the same way as the built-in C++ bitwise operators of the same name. For example:</p> <pre> QBitArray x(5); x.setBit(3, true); <span class="comment"> // x: [ 0, 0, 0, 1, 0 ]</span> QBitArray y(5); y.setBit(4, true); <span class="comment"> // y: [ 0, 0, 0, 0, 1 ]</span> x |= y; <span class="comment"> // x: [ 0, 0, 0, 1, 1 ]</span></pre> <p>For historical reasons, <a href="QBitArray.html#QBitArray()"><tt>QBitArray</tt></a> distinguishes between a null bit array and an empty bit array. A <i>null</i> bit array is a bit array that is initialized using <a href="QBitArray.html#QBitArray()"><tt>QBitArray</tt></a>'s default constructor. An <i>empty</i> bit array is any bit array with size 0. A null bit array is always empty, but an empty bit array isn't necessarily null:</p> <pre> QBitArray().isNull(); <span class="comment">// returns true</span> QBitArray().isEmpty(); <span class="comment">// returns true</span> QBitArray(0).isNull(); <span class="comment">// returns false</span> QBitArray(0).isEmpty(); <span class="comment">// returns true</span> QBitArray(3).isNull(); <span class="comment">// returns false</span> QBitArray(3).isEmpty(); <span class="comment">// returns false</span></pre> <p>All functions except <a href="QBitArray.html#isNull()"><tt>isNull</tt></a> treat null bit arrays the same as empty bit arrays; for example, <a href="QBitArray.html#QBitArray()"><tt>QBitArray</tt></a> compares equal to <a href="QBitArray.html#QBitArray()"><tt>QBitArray</tt></a>(0). We recommend that you always use <a href="QBitArray.html#isEmpty()"><tt>isEmpty</tt></a> and avoid <a href="QBitArray.html#isNull()"><tt>isNull</tt></a>.</p> <P> <P> <DL> <DT><B>See Also:</B><DD><a href="QByteArray.html"><tt>QByteArray</tt></a>, <tt>QVector</tt></DL> <HR> <P> <!-- ======== NESTED CLASS SUMMARY ======== --> <A NAME="nested_class_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>Nested Class Summary</B></FONT></TH> </TR> </TABLE> <A NAME="nested_classes_inherited_from_class_com.trolltech.qt.QSignalEmitter"><!-- --></A> <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> <TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor"> <TH ALIGN="left"><B>Nested classes/interfaces inherited from class com.trolltech.qt.<A HREF="../../../../com/trolltech/qt/QSignalEmitter.html" title="class in com.trolltech.qt">QSignalEmitter</A></B></TH> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD><CODE><A HREF="../../../../com/trolltech/qt/QSignalEmitter.Signal0.html" title="class in com.trolltech.qt">QSignalEmitter.Signal0</A>, <A HREF="../../../../com/trolltech/qt/QSignalEmitter.Signal1.html" title="class in com.trolltech.qt">QSignalEmitter.Signal1</A><<A HREF="../../../../com/trolltech/qt/QSignalEmitter.Signal1.html" title="type parameter in QSignalEmitter.Signal1">A</A>>, <A HREF="../../../../com/trolltech/qt/QSignalEmitter.Signal2.html" title="class in com.trolltech.qt">QSignalEmitter.Signal2</A><<A HREF="../../../../com/trolltech/qt/QSignalEmitter.Signal2.html" title="type parameter in QSignalEmitter.Signal2">A</A>,<A HREF="../../../../com/trolltech/qt/QSignalEmitter.Signal2.html" title="type parameter in QSignalEmitter.Signal2">B</A>>, <A HREF="../../../../com/trolltech/qt/QSignalEmitter.Signal3.html" title="class in com.trolltech.qt">QSignalEmitter.Signal3</A><<A HREF="../../../../com/trolltech/qt/QSignalEmitter.Signal3.html" title="type parameter in QSignalEmitter.Signal3">A</A>,<A HREF="../../../../com/trolltech/qt/QSignalEmitter.Signal3.html" title="type parameter in QSignalEmitter.Signal3">B</A>,<A HREF="../../../../com/trolltech/qt/QSignalEmitter.Signal3.html" title="type parameter in QSignalEmitter.Signal3">C</A>>, <A HREF="../../../../com/trolltech/qt/QSignalEmitter.Signal4.html" title="class in com.trolltech.qt">QSignalEmitter.Signal4</A><<A HREF="../../../../com/trolltech/qt/QSignalEmitter.Signal4.html" title="type parameter in QSignalEmitter.Signal4">A</A>,<A HREF="../../../../com/trolltech/qt/QSignalEmitter.Signal4.html" title="type parameter in QSignalEmitter.Signal4">B</A>,<A HREF="../../../../com/trolltech/qt/QSignalEmitter.Signal4.html" title="type parameter in QSignalEmitter.Signal4">C</A>,<A HREF="../../../../com/trolltech/qt/QSignalEmitter.Signal4.html" title="type parameter in QSignalEmitter.Signal4">D</A>>, <A HREF="../../../../com/trolltech/qt/QSignalEmitter.Signal5.html" title="class in com.trolltech.qt">QSignalEmitter.Signal5</A><<A HREF="../../../../com/trolltech/qt/QSignalEmitter.Signal5.html" title="type parameter in QSignalEmitter.Signal5">A</A>,<A HREF="../../../../com/trolltech/qt/QSignalEmitter.Signal5.html" title="type parameter in QSignalEmitter.Signal5">B</A>,<A HREF="../../../../com/trolltech/qt/QSignalEmitter.Signal5.html" title="type parameter in QSignalEmitter.Signal5">C</A>,<A HREF="../../../../com/trolltech/qt/QSignalEmitter.Signal5.html" title="type parameter in QSignalEmitter.Signal5">D</A>,<A HREF="../../../../com/trolltech/qt/QSignalEmitter.Signal5.html" title="type parameter in QSignalEmitter.Signal5">E</A>>, <A HREF="../../../../com/trolltech/qt/QSignalEmitter.Signal6.html" title="class in com.trolltech.qt">QSignalEmitter.Signal6</A><<A HREF="../../../../com/trolltech/qt/QSignalEmitter.Signal6.html" title="type parameter in QSignalEmitter.Signal6">A</A>,<A HREF="../../../../com/trolltech/qt/QSignalEmitter.Signal6.html" title="type parameter in QSignalEmitter.Signal6">B</A>,<A HREF="../../../../com/trolltech/qt/QSignalEmitter.Signal6.html" title="type parameter in QSignalEmitter.Signal6">C</A>,<A HREF="../../../../com/trolltech/qt/QSignalEmitter.Signal6.html" title="type parameter in QSignalEmitter.Signal6">D</A>,<A HREF="../../../../com/trolltech/qt/QSignalEmitter.Signal6.html" title="type parameter in QSignalEmitter.Signal6">E</A>,<A HREF="../../../../com/trolltech/qt/QSignalEmitter.Signal6.html" title="type parameter in QSignalEmitter.Signal6">F</A>>, <A HREF="../../../../com/trolltech/qt/QSignalEmitter.Signal7.html" title="class in com.trolltech.qt">QSignalEmitter.Signal7</A><<A HREF="../../../../com/trolltech/qt/QSignalEmitter.Signal7.html" title="type parameter in QSignalEmitter.Signal7">A</A>,<A HREF="../../../../com/trolltech/qt/QSignalEmitter.Signal7.html" title="type parameter in QSignalEmitter.Signal7">B</A>,<A HREF="../../../../com/trolltech/qt/QSignalEmitter.Signal7.html" title="type parameter in QSignalEmitter.Signal7">C</A>,<A HREF="../../../../com/trolltech/qt/QSignalEmitter.Signal7.html" title="type parameter in QSignalEmitter.Signal7">D</A>,<A HREF="../../../../com/trolltech/qt/QSignalEmitter.Signal7.html" title="type parameter in QSignalEmitter.Signal7">E</A>,<A HREF="../../../../com/trolltech/qt/QSignalEmitter.Signal7.html" title="type parameter in QSignalEmitter.Signal7">F</A>,<A HREF="../../../../com/trolltech/qt/QSignalEmitter.Signal7.html" title="type parameter in QSignalEmitter.Signal7">G</A>>, <A HREF="../../../../com/trolltech/qt/QSignalEmitter.Signal8.html" title="class in com.trolltech.qt">QSignalEmitter.Signal8</A><<A HREF="../../../../com/trolltech/qt/QSignalEmitter.Signal8.html" title="type parameter in QSignalEmitter.Signal8">A</A>,<A HREF="../../../../com/trolltech/qt/QSignalEmitter.Signal8.html" title="type parameter in QSignalEmitter.Signal8">B</A>,<A HREF="../../../../com/trolltech/qt/QSignalEmitter.Signal8.html" title="type parameter in QSignalEmitter.Signal8">C</A>,<A HREF="../../../../com/trolltech/qt/QSignalEmitter.Signal8.html" title="type parameter in QSignalEmitter.Signal8">D</A>,<A HREF="../../../../com/trolltech/qt/QSignalEmitter.Signal8.html" title="type parameter in QSignalEmitter.Signal8">E</A>,<A HREF="../../../../com/trolltech/qt/QSignalEmitter.Signal8.html" title="type parameter in QSignalEmitter.Signal8">F</A>,<A HREF="../../../../com/trolltech/qt/QSignalEmitter.Signal8.html" title="type parameter in QSignalEmitter.Signal8">G</A>,<A HREF="../../../../com/trolltech/qt/QSignalEmitter.Signal8.html" title="type parameter in QSignalEmitter.Signal8">H</A>>, <A HREF="../../../../com/trolltech/qt/QSignalEmitter.Signal9.html" title="class in com.trolltech.qt">QSignalEmitter.Signal9</A><<A HREF="../../../../com/trolltech/qt/QSignalEmitter.Signal9.html" title="type parameter in QSignalEmitter.Signal9">A</A>,<A HREF="../../../../com/trolltech/qt/QSignalEmitter.Signal9.html" title="type parameter in QSignalEmitter.Signal9">B</A>,<A HREF="../../../../com/trolltech/qt/QSignalEmitter.Signal9.html" title="type parameter in QSignalEmitter.Signal9">C</A>,<A HREF="../../../../com/trolltech/qt/QSignalEmitter.Signal9.html" title="type parameter in QSignalEmitter.Signal9">D</A>,<A HREF="../../../../com/trolltech/qt/QSignalEmitter.Signal9.html" title="type parameter in QSignalEmitter.Signal9">E</A>,<A HREF="../../../../com/trolltech/qt/QSignalEmitter.Signal9.html" title="type parameter in QSignalEmitter.Signal9">F</A>,<A HREF="../../../../com/trolltech/qt/QSignalEmitter.Signal9.html" title="type parameter in QSignalEmitter.Signal9">G</A>,<A HREF="../../../../com/trolltech/qt/QSignalEmitter.Signal9.html" title="type parameter in QSignalEmitter.Signal9">H</A>,<A HREF="../../../../com/trolltech/qt/QSignalEmitter.Signal9.html" title="type parameter in QSignalEmitter.Signal9">I</A>></CODE></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="../../../../com/trolltech/qt/core/QBitArray.html#QBitArray()">QBitArray</A></B>()</CODE> <BR> Constructs an empty bit array.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD><CODE><B><A HREF="../../../../com/trolltech/qt/core/QBitArray.html#QBitArray(int)">QBitArray</A></B>(int size)</CODE> <BR> Equivalent to <a href="QBitArray.html#QBitArray()"><tt>QBitArray</tt></a>(<tt>size</tt>, false).</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD><CODE><B><A HREF="../../../../com/trolltech/qt/core/QBitArray.html#QBitArray(int, boolean)">QBitArray</A></B>(int size, boolean val)</CODE> <BR> Constructs a bit array containing <tt>size</tt> bits.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD><CODE><B><A HREF="../../../../com/trolltech/qt/core/QBitArray.html#QBitArray(com.trolltech.qt.core.QBitArray)">QBitArray</A></B>(<A HREF="../../../../com/trolltech/qt/core/QBitArray.html" title="class in com.trolltech.qt.core">QBitArray</A> other)</CODE> <BR> Constructs a copy of <tt>other</tt>.</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> void</CODE></FONT></TD> <TD><CODE><B><A HREF="../../../../com/trolltech/qt/core/QBitArray.html#and(com.trolltech.qt.core.QBitArray)">and</A></B>(<A HREF="../../../../com/trolltech/qt/core/QBitArray.html" title="class in com.trolltech.qt.core">QBitArray</A> other)</CODE> <BR> Returns a bit array that is the AND of this bit array and <tt>other</tt>.</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="../../../../com/trolltech/qt/core/QBitArray.html#at(int)">at</A></B>(int i)</CODE> <BR> Returns the value of the bit at index position <tt>i</tt>.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE> void</CODE></FONT></TD> <TD><CODE><B><A HREF="../../../../com/trolltech/qt/core/QBitArray.html#clear()">clear</A></B>()</CODE> <BR> Clears the contents of the bit array and makes it empty.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE> void</CODE></FONT></TD> <TD><CODE><B><A HREF="../../../../com/trolltech/qt/core/QBitArray.html#clearBit(int)">clearBit</A></B>(int i)</CODE> <BR> Sets the bit at index position <tt>i</tt> to 0.</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="../../../../com/trolltech/qt/core/QBitArray.html#count()">count</A></B>()</CODE> <BR> Same as <a href="QBitArray.html#size()"><tt>size</tt></a>.</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="../../../../com/trolltech/qt/core/QBitArray.html#count(boolean)">count</A></B>(boolean on)</CODE> <BR> If <tt>on</tt> is true, this function returns the number of 1-bits stored in the bit array; otherwise the number of 0-bits is returned.</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="../../../../com/trolltech/qt/core/QBitArray.html#equals(java.lang.Object)">equals</A></B>(java.lang.Object other)</CODE> <BR> </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="../../../../com/trolltech/qt/core/QBitArray.html#fill(boolean)">fill</A></B>(boolean val)</CODE> <BR> Equivalent to <a href="QBitArray.html#fill(boolean, int)">fill</tt></a>(<tt>val</tt>, -1).</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="../../../../com/trolltech/qt/core/QBitArray.html#fill(boolean, int)">fill</A></B>(boolean val, int size)</CODE> <BR> Sets every bit in the bit array to <tt>val</tt>, returning true if successful; otherwise returns false.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE> void</CODE></FONT></TD> <TD><CODE><B><A HREF="../../../../com/trolltech/qt/core/QBitArray.html#fill(boolean, int, int)">fill</A></B>(boolean val, int first, int last)</CODE> <BR> Sets bits at index positions <tt>first</tt> up to and excluding <tt>last</tt> to <tt>val</tt>.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE>static <A HREF="../../../../com/trolltech/qt/core/QBitArray.html" title="class in com.trolltech.qt.core">QBitArray</A></CODE></FONT></TD> <TD><CODE><B><A HREF="../../../../com/trolltech/qt/core/QBitArray.html#fromNativePointer(com.trolltech.qt.QNativePointer)">fromNativePointer</A></B>(<A HREF="../../../../com/trolltech/qt/QNativePointer.html" title="class in com.trolltech.qt">QNativePointer</A> nativePointer)</CODE> <BR> This function returns the QBitArray instance pointed to by nativePointer</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="../../../../com/trolltech/qt/core/QBitArray.html#hashCode()">hashCode</A></B>()</CODE> <BR> </TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE> <A HREF="../../../../com/trolltech/qt/core/QBitArray.html" title="class in com.trolltech.qt.core">QBitArray</A></CODE></FONT></TD> <TD><CODE><B><A HREF="../../../../com/trolltech/qt/core/QBitArray.html#inverted()">inverted</A></B>()</CODE> <BR> Returns a bit array that contains the inverted bits of this bit array.</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="../../../../com/trolltech/qt/core/QBitArray.html#isEmpty()">isEmpty</A></B>()</CODE> <BR> Returns true if this bit array has size 0; otherwise returns false.</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="../../../../com/trolltech/qt/core/QBitArray.html#isNull()">isNull</A></B>()</CODE> <BR> Returns true if this bit array is null; otherwise returns false.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE>static <A HREF="../../../../com/trolltech/qt/QNativePointer.html" title="class in com.trolltech.qt">QNativePointer</A></CODE></FONT></TD> <TD><CODE><B><A HREF="../../../../com/trolltech/qt/core/QBitArray.html#nativePointerArray(com.trolltech.qt.core.QBitArray[])">nativePointerArray</A></B>(<A HREF="../../../../com/trolltech/qt/core/QBitArray.html" title="class in com.trolltech.qt.core">QBitArray</A>[] array)</CODE> <BR> This function returns a QNativePointer that is pointing to the specified QBitArray array.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE> void</CODE></FONT></TD> <TD><CODE><B><A HREF="../../../../com/trolltech/qt/core/QBitArray.html#or(com.trolltech.qt.core.QBitArray)">or</A></B>(<A HREF="../../../../com/trolltech/qt/core/QBitArray.html" title="class in com.trolltech.qt.core">QBitArray</A> other)</CODE> <BR> Returns a bit array that is the OR of this bit array and <tt>other</tt>.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE> void</CODE></FONT></TD> <TD><CODE><B><A HREF="../../../../com/trolltech/qt/core/QBitArray.html#readFrom(com.trolltech.qt.core.QDataStream)">readFrom</A></B>(<A HREF="../../../../com/trolltech/qt/core/QDataStream.html" title="class in com.trolltech.qt.core">QDataStream</A> arg__1)</CODE> <BR> Reads a QBitArray from arg__1.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE> void</CODE></FONT></TD> <TD><CODE><B><A HREF="../../../../com/trolltech/qt/core/QBitArray.html#resize(int)">resize</A></B>(int size)</CODE> <BR> Resizes the bit array to <tt>size</tt> bits.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE> void</CODE></FONT></TD> <TD><CODE><B><A HREF="../../../../com/trolltech/qt/core/QBitArray.html#set(com.trolltech.qt.core.QBitArray)">set</A></B>(<A HREF="../../../../com/trolltech/qt/core/QBitArray.html" title="class in com.trolltech.qt.core">QBitArray</A> other)</CODE> <BR> This function sets the contents of this array to the same as <tt>other</tt>s.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE> void</CODE></FONT></TD> <TD><CODE><B><A HREF="../../../../com/trolltech/qt/core/QBitArray.html#setBit(int)">setBit</A></B>(int i)</CODE> <BR> Sets the bit at index position <tt>i</tt> to 1.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE> void</CODE></FONT></TD> <TD><CODE><B><A HREF="../../../../com/trolltech/qt/core/QBitArray.html#setBit(int, boolean)">setBit</A></B>(int i, boolean val)</CODE> <BR> Sets the bit at index position <tt>i</tt> to <tt>val</tt>.</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="../../../../com/trolltech/qt/core/QBitArray.html#size()">size</A></B>()</CODE> <BR> Returns the number of bits stored in the bit array.</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="../../../../com/trolltech/qt/core/QBitArray.html#testBit(int)">testBit</A></B>(int i)</CODE> <BR> Returns true if the bit at index position <tt>i</tt> is 1; otherwise returns false.</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="../../../../com/trolltech/qt/core/QBitArray.html#toggleBit(int)">toggleBit</A></B>(int i)</CODE> <BR> Inverts the value of the bit at index position <tt>i</tt>, returning the previous value of that bit as either true (if it was set) or false (if it was unset).</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE> void</CODE></FONT></TD> <TD><CODE><B><A HREF="../../../../com/trolltech/qt/core/QBitArray.html#truncate(int)">truncate</A></B>(int pos)</CODE> <BR> Truncates the bit array at index position <tt>pos</tt>.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE> void</CODE></FONT></TD> <TD><CODE><B><A HREF="../../../../com/trolltech/qt/core/QBitArray.html#writeTo(com.trolltech.qt.core.QDataStream)">writeTo</A></B>(<A HREF="../../../../com/trolltech/qt/core/QDataStream.html" title="class in com.trolltech.qt.core">QDataStream</A> arg__1)</CODE> <BR> Writes thisQBitArray to arg__1.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE> void</CODE></FONT></TD> <TD><CODE><B><A HREF="../../../../com/trolltech/qt/core/QBitArray.html#xor(com.trolltech.qt.core.QBitArray)">xor</A></B>(<A HREF="../../../../com/trolltech/qt/core/QBitArray.html" title="class in com.trolltech.qt.core">QBitArray</A> other)</CODE> <BR> Returns a bit array that is the XOR of this bit array and <tt>other</tt>.</TD> </TR> </TABLE> <A NAME="methods_inherited_from_class_com.trolltech.qt.QtJambiObject"><!-- --></A> <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> <TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor"> <TH ALIGN="left"><B>Methods inherited from class com.trolltech.qt.<A HREF="../../../../com/trolltech/qt/QtJambiObject.html" title="class in com.trolltech.qt">QtJambiObject</A></B></TH> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD><CODE><A HREF="../../../../com/trolltech/qt/QtJambiObject.html#dispose()">dispose</A>, <A HREF="../../../../com/trolltech/qt/QtJambiObject.html#disposed()">disposed</A>, <A HREF="../../../../com/trolltech/qt/QtJambiObject.html#finalize()">finalize</A>, <A HREF="../../../../com/trolltech/qt/QtJambiObject.html#reassignNativeResources(com.trolltech.qt.QtJambiObject, java.lang.Class)">reassignNativeResources</A>, <A HREF="../../../../com/trolltech/qt/QtJambiObject.html#tr(java.lang.String)">tr</A>, <A HREF="../../../../com/trolltech/qt/QtJambiObject.html#tr(java.lang.String, java.lang.String)">tr</A>, <A HREF="../../../../com/trolltech/qt/QtJambiObject.html#tr(java.lang.String, java.lang.String, int)">tr</A></CODE></TD> </TR> </TABLE> <A NAME="methods_inherited_from_class_com.trolltech.qt.QSignalEmitter"><!-- --></A> <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> <TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor"> <TH ALIGN="left"><B>Methods inherited from class com.trolltech.qt.<A HREF="../../../../com/trolltech/qt/QSignalEmitter.html" title="class in com.trolltech.qt">QSignalEmitter</A></B></TH> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD><CODE><A HREF="../../../../com/trolltech/qt/QSignalEmitter.html#blockSignals(boolean)">blockSignals</A>, <A HREF="../../../../com/trolltech/qt/QSignalEmitter.html#disconnect()">disconnect</A>, <A HREF="../../../../com/trolltech/qt/QSignalEmitter.html#disconnect(java.lang.Object)">disconnect</A>, <A HREF="../../../../com/trolltech/qt/QSignalEmitter.html#signalsBlocked()">signalsBlocked</A>, <A HREF="../../../../com/trolltech/qt/QSignalEmitter.html#signalSender()">signalSender</A>, <A HREF="../../../../com/trolltech/qt/QSignalEmitter.html#thread()">thread</A></CODE></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>clone, getClass, notify, notifyAll, toString, wait, wait, wait</CODE></TD> </TR> </TABLE> <A NAME="methods_inherited_from_class_com.trolltech.qt.QtJambiInterface"><!-- --></A> <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> <TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor"> <TH ALIGN="left"><B>Methods inherited from interface com.trolltech.qt.<A HREF="../../../../com/trolltech/qt/QtJambiInterface.html" title="interface in com.trolltech.qt">QtJambiInterface</A></B></TH> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD><CODE><A HREF="../../../../com/trolltech/qt/QtJambiInterface.html#disableGarbageCollection()">disableGarbageCollection</A>, <A HREF="../../../../com/trolltech/qt/QtJambiInterface.html#nativeId()">nativeId</A>, <A HREF="../../../../com/trolltech/qt/QtJambiInterface.html#nativePointer()">nativePointer</A>, <A HREF="../../../../com/trolltech/qt/QtJambiInterface.html#reenableGarbageCollection()">reenableGarbageCollection</A>, <A HREF="../../../../com/trolltech/qt/QtJambiInterface.html#setJavaOwnership()">setJavaOwnership</A></CODE></TD> </TR> </TABLE> <P> <!-- ========= 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="QBitArray(int)"><!-- --></A><H3> QBitArray</H3> <PRE> public <B>QBitArray</B>(int size)</PRE> <DL> <DD><p>Equivalent to <a href="QBitArray.html#QBitArray()"><tt>QBitArray</tt></a>(<tt>size</tt>, false). <P> </DL> <HR> <A NAME="QBitArray(int, boolean)"><!-- --></A><H3> QBitArray</H3> <PRE> public <B>QBitArray</B>(int size, boolean val)</PRE> <DL> <DD><p>Constructs a bit array containing <tt>size</tt> bits. The bits are initialized with <tt>val</tt>, which defaults to false (0).</p> <P> </DL> <HR> <A NAME="QBitArray(com.trolltech.qt.core.QBitArray)"><!-- --></A><H3> QBitArray</H3> <PRE> public <B>QBitArray</B>(<A HREF="../../../../com/trolltech/qt/core/QBitArray.html" title="class in com.trolltech.qt.core">QBitArray</A> other)</PRE> <DL> <DD><p>Constructs a copy of <tt>other</tt>.</p> <p>This operation takes constant time</tt>, because <a href="QBitArray.html#QBitArray()"><tt>QBitArray</tt></a> is implicitly shared</tt>. This makes returning a <a href="QBitArray.html#QBitArray()"><tt>QBitArray</tt></a> from a function very fast. If a shared instance is modified, it will be copied (copy-on-write), and that takes linear time</tt>.</p> <P> <DL> <DT><B>See Also:</B><DD><tt>operator=</tt></DL> </DL> <HR> <A NAME="QBitArray()"><!-- --></A><H3> QBitArray</H3> <PRE> public <B>QBitArray</B>()</PRE> <DL> <DD><p>Constructs an empty bit array.</p> <P> <DL> <DT><B>See Also:</B><DD><a href="QBitArray.html#isEmpty()"><tt>isEmpty</tt></a></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="at(int)"><!-- --></A><H3> at</H3> <PRE> public final boolean <B>at</B>(int i)</PRE> <DL> <DD><p>Returns the value of the bit at index position <tt>i</tt>.</p> <p><tt>i</tt> must be a valid index position in the bit array (i.e., 0 <= <tt>i</tt> < <a href="QBitArray.html#size()"><tt>size</tt></a>).</p> <P> <DD><DL> <DT><B>See Also:</B><DD><tt>operator[]</tt></DL> </DD> </DL> <HR> <A NAME="clear()"><!-- --></A><H3> clear</H3> <PRE> public final void <B>clear</B>()</PRE> <DL> <DD><p>Clears the contents of the bit array and makes it empty.</p> <P> <DD><DL> <DT><B>See Also:</B><DD><a href="QBitArray.html#resize(int)"><tt>resize</tt></a>, <a href="QBitArray.html#isEmpty()"><tt>isEmpty</tt></a></DL> </DD> </DL> <HR> <A NAME="clearBit(int)"><!-- --></A><H3> clearBit</H3> <PRE> public final void <B>clearBit</B>(int i)</PRE> <DL> <DD><p>Sets the bit at index position <tt>i</tt> to 0.</p> <p><tt>i</tt> must be a valid index position in the bit array (i.e., 0 <= <tt>i</tt> < <a href="QBitArray.html#size()"><tt>size</tt></a>).</p> <P> <DD><DL> <DT><B>See Also:</B><DD><a href="QBitArray.html#setBit(int, boolean)"><tt>setBit</tt></a>, <a href="QBitArray.html#toggleBit(int)"><tt>toggleBit</tt></a></DL> </DD> </DL> <HR> <A NAME="count(boolean)"><!-- --></A><H3> count</H3> <PRE> public final int <B>count</B>(boolean on)</PRE> <DL> <DD><p>If <tt>on</tt> is true, this function returns the number of 1-bits stored in the bit array; otherwise the number of 0-bits is returned.</p> <P> <DD><DL> </DL> </DD> </DL> <HR> <A NAME="count()"><!-- --></A><H3> count</H3> <PRE> public final int <B>count</B>()</PRE> <DL> <DD><p>Same as <a href="QBitArray.html#size()"><tt>size</tt></a>.</p> <P> <DD><DL> </DL> </DD> </DL> <HR> <A NAME="fill(boolean, int, int)"><!-- --></A><H3> fill</H3> <PRE> public final void <B>fill</B>(boolean val, int first, int last)</PRE> <DL> <DD><p>Sets bits at index positions <tt>first</tt> up to and excluding <tt>last</tt> to <tt>val</tt>.</p> <p><tt>first</tt> and <tt>last</tt> must be a valid index position in the bit array (i.e., 0 <= <tt>first</tt> <= <a href="QBitArray.html#size()"><tt>size</tt></a> and 0 <= <tt>last</tt> <= <a href="QBitArray.html#size()"><tt>size</tt></a>).</p> <P> <DD><DL> </DL> </DD> </DL> <HR> <A NAME="fill(boolean)"><!-- --></A><H3> fill</H3> <PRE> public final boolean <B>fill</B>(boolean val)</PRE> <DL> <DD><p>Equivalent to <a href="QBitArray.html#fill(boolean, int)">fill</tt></a>(<tt>val</tt>, -1). <P> <DD><DL> </DL> </DD> </DL> <HR> <A NAME="fill(boolean, int)"><!-- --></A><H3> fill</H3> <PRE> public final boolean <B>fill</B>(boolean val, int size)</PRE> <DL> <DD><p>Sets every bit in the bit array to <tt>val</tt>, returning true if successful; otherwise returns false. If <tt>size</tt> is different from -1 (the default), the bit array is resized to <tt>size</tt> beforehand.</p> <p>Example:</p> <pre> QBitArray ba(8); ba.fill(true); <span class="comment"> // ba: [ 1, 1, 1, 1, 1, 1, 1, 1 ]</span> ba.fill(false, 2); <span class="comment"> // ba: [ 0, 0 ]</span></pre> <P> <DD><DL> <DT><B>See Also:</B><DD><a href="QBitArray.html#resize(int)"><tt>resize</tt></a></DL> </DD> </DL> <HR> <A NAME="isEmpty()"><!-- --></A><H3> isEmpty</H3> <PRE> public final boolean <B>isEmpty</B>()</PRE> <DL> <DD><p>Returns true if this bit array has size 0; otherwise returns false.</p> <P> <DD><DL> <DT><B>See Also:</B><DD><a href="QBitArray.html#size()"><tt>size</tt></a></DL> </DD> </DL> <HR> <A NAME="isNull()"><!-- --></A><H3> isNull</H3> <PRE> public final boolean <B>isNull</B>()</PRE> <DL> <DD><p>Returns true if this bit array is null; otherwise returns false.</p> <p>Example:</p> <pre> QBitArray().isNull(); <span class="comment">// returns true</span> QBitArray(0).isNull(); <span class="comment">// returns false</span> QBitArray(3).isNull(); <span class="comment">// returns false</span></pre> <p>Qt makes a distinction between null bit arrays and empty bit arrays for historical reasons. For most applications, what matters is whether or not a bit array contains any data, and this can be determined using <a href="QBitArray.html#isEmpty()"><tt>isEmpty</tt></a>.</p> <P> <DD><DL> <DT><B>See Also:</B><DD><a href="QBitArray.html#isEmpty()"><tt>isEmpty</tt></a></DL> </DD> </DL> <HR> <A NAME="writeTo(com.trolltech.qt.core.QDataStream)"><!-- --></A><H3> writeTo</H3> <PRE> public final void <B>writeTo</B>(<A HREF="../../../../com/trolltech/qt/core/QDataStream.html" title="class in com.trolltech.qt.core">QDataStream</A> arg__1)</PRE> <DL> <DD>Writes thisQBitArray to arg__1. <P> <DD><DL> </DL> </DD> </DL> <HR> <A NAME="readFrom(com.trolltech.qt.core.QDataStream)"><!-- --></A><H3> readFrom</H3> <PRE> public final void <B>readFrom</B>(<A HREF="../../../../com/trolltech/qt/core/QDataStream.html" title="class in com.trolltech.qt.core">QDataStream</A> arg__1)</PRE> <DL> <DD>Reads a QBitArray from arg__1. <P> <DD><DL> </DL> </DD> </DL> <HR> <A NAME="resize(int)"><!-- --></A><H3> resize</H3> <PRE> public final void <B>resize</B>(int size)</PRE> <DL> <DD><p>Resizes the bit array to <tt>size</tt> bits.</p> <p>If <tt>size</tt> is greater than the current size, the bit array is extended to make it <tt>size</tt> bits with the extra bits added to the end. The new bits are initialized to false (0).</p> <p>If <tt>size</tt> is less than the current size, bits are removed from the end.</p> <P> <DD><DL> <DT><B>See Also:</B><DD><a href="QBitArray.html#size()"><tt>size</tt></a></DL> </DD> </DL> <HR> <A NAME="setBit(int)"><!-- --></A><H3> setBit</H3> <PRE> public final void <B>setBit</B>(int i)</PRE> <DL> <DD><p>Sets the bit at index position <tt>i</tt> to 1.</p> <p><tt>i</tt> must be a valid index position in the bit array (i.e., 0 <= <tt>i</tt> < <a href="QBitArray.html#size()"><tt>size</tt></a>).</p> <P> <DD><DL> <DT><B>See Also:</B><DD><a href="QBitArray.html#clearBit(int)"><tt>clearBit</tt></a>, <a href="QBitArray.html#toggleBit(int)"><tt>toggleBit</tt></a></DL> </DD> </DL> <HR> <A NAME="setBit(int, boolean)"><!-- --></A><H3> setBit</H3> <PRE> public final void <B>setBit</B>(int i, boolean val)</PRE> <DL> <DD><p>Sets the bit at index position <tt>i</tt> to <tt>val</tt>.</p> <P> <DD><DL> </DL> </DD> </DL> <HR> <A NAME="size()"><!-- --></A><H3> size</H3> <PRE> public final int <B>size</B>()</PRE> <DL> <DD><p>Returns the number of bits stored in the bit array.</p> <P> <DD><DL> <DT><B>See Also:</B><DD><a href="QBitArray.html#resize(int)"><tt>resize</tt></a></DL> </DD> </DL> <HR> <A NAME="testBit(int)"><!-- --></A><H3> testBit</H3> <PRE> public final boolean <B>testBit</B>(int i)</PRE> <DL> <DD><p>Returns true if the bit at index position <tt>i</tt> is 1; otherwise returns false.</p> <p><tt>i</tt> must be a valid index position in the bit array (i.e., 0 <= <tt>i</tt> < <a href="QBitArray.html#size()"><tt>size</tt></a>).</p> <P> <DD><DL> <DT><B>See Also:</B><DD><a href="QBitArray.html#setBit(int, boolean)"><tt>setBit</tt></a>, <a href="QBitArray.html#clearBit(int)"><tt>clearBit</tt></a></DL> </DD> </DL> <HR> <A NAME="toggleBit(int)"><!-- --></A><H3> toggleBit</H3> <PRE> public final boolean <B>toggleBit</B>(int i)</PRE> <DL> <DD><p>Inverts the value of the bit at index position <tt>i</tt>, returning the previous value of that bit as either true (if it was set) or false (if it was unset).</p> <p>If the previous value was 0, the new value will be 1. If the previous value was 1, the new value will be 0.</p> <p><tt>i</tt> must be a valid index position in the bit array (i.e., 0 <= <tt>i</tt> < <a href="QBitArray.html#size()"><tt>size</tt></a>).</p> <P> <DD><DL> <DT><B>See Also:</B><DD><a href="QBitArray.html#setBit(int, boolean)"><tt>setBit</tt></a>, <a href="QBitArray.html#clearBit(int)"><tt>clearBit</tt></a></DL> </DD> </DL> <HR> <A NAME="truncate(int)"><!-- --></A><H3> truncate</H3> <PRE> public final void <B>truncate</B>(int pos)</PRE> <DL> <DD><p>Truncates the bit array at index position <tt>pos</tt>.</p> <p>If <tt>pos</tt> is beyond the end of the array, nothing happens.</p> <P> <DD><DL> <DT><B>See Also:</B><DD><a href="QBitArray.html#resize(int)"><tt>resize</tt></a></DL> </DD> </DL> <HR> <A NAME="fromNativePointer(com.trolltech.qt.QNativePointer)"><!-- --></A><H3> fromNativePointer</H3> <PRE> public static <A HREF="../../../../com/trolltech/qt/core/QBitArray.html" title="class in com.trolltech.qt.core">QBitArray</A> <B>fromNativePointer</B>(<A HREF="../../../../com/trolltech/qt/QNativePointer.html" title="class in com.trolltech.qt">QNativePointer</A> nativePointer)</PRE> <DL> <DD>This function returns the QBitArray instance pointed to by nativePointer <P> <DD><DL> <DT><B>Parameters:</B><DD><CODE>nativePointer</CODE> - the QNativePointer of which object should be returned.</DL> </DD> </DL> <HR> <A NAME="nativePointerArray(com.trolltech.qt.core.QBitArray[])"><!-- --></A><H3> nativePointerArray</H3> <PRE> public static <A HREF="../../../../com/trolltech/qt/QNativePointer.html" title="class in com.trolltech.qt">QNativePointer</A> <B>nativePointerArray</B>(<A HREF="../../../../com/trolltech/qt/core/QBitArray.html" title="class in com.trolltech.qt.core">QBitArray</A>[] array)</PRE> <DL> <DD>This function returns a QNativePointer that is pointing to the specified QBitArray array. <P> <DD><DL> <DT><B>Parameters:</B><DD><CODE>array</CODE> - the array that the returned pointer will point to. <DT><B>Returns:</B><DD>a QNativePointer that is pointing to the specified array.</DL> </DD> </DL> <HR> <A NAME="equals(java.lang.Object)"><!-- --></A><H3> equals</H3> <PRE> public boolean <B>equals</B>(java.lang.Object other)</PRE> <DL> <DD> <P> <DD><DL> <DT><B>Overrides:</B><DD><CODE>equals</CODE> in class <CODE>java.lang.Object</CODE></DL> </DD> <DD><DL> </DL> </DD> </DL> <HR> <A NAME="hashCode()"><!-- --></A><H3> hashCode</H3> <PRE> public int <B>hashCode</B>()</PRE> <DL> <DD> <P> <DD><DL> <DT><B>Overrides:</B><DD><CODE>hashCode</CODE> in class <CODE>java.lang.Object</CODE></DL> </DD> <DD><DL> </DL> </DD> </DL> <HR> <A NAME="xor(com.trolltech.qt.core.QBitArray)"><!-- --></A><H3> xor</H3> <PRE> public void <B>xor</B>(<A HREF="../../../../com/trolltech/qt/core/QBitArray.html" title="class in com.trolltech.qt.core">QBitArray</A> other)</PRE> <DL> <DD>Returns a bit array that is the XOR of this bit array and <tt>other</tt>. <p> The result has the length of the longest of the two bit arrays, with any missing bits (if one array is shorter than the other) taken to be 0. <p> Example: <p> <code> <pre> QBitArray a(3); QBitArray b(2); QBitArray c; a[0] = 1; a[1] = 0; a[2] = 1; // a: [ 1, 0, 1 ] b[0] = 1; b[1] = 0; // b: [ 1, 1 ] c = a ^ b; // c: [ 0, 1, 1 ] </pre> </code> <P> <DD><DL> </DL> </DD> </DL> <HR> <A NAME="and(com.trolltech.qt.core.QBitArray)"><!-- --></A><H3> and</H3> <PRE> public void <B>and</B>(<A HREF="../../../../com/trolltech/qt/core/QBitArray.html" title="class in com.trolltech.qt.core">QBitArray</A> other)</PRE> <DL> <DD>Returns a bit array that is the AND of this bit array and <tt>other</tt>. <p> The result has the length of the longest of the two bit arrays, with any missing bits (if one array is shorter than the other) taken to be 0. <p> Example: <p> <code> <pre> QBitArray a(3); QBitArray b(2); QBitArray c; a[0] = 1; a[1] = 0; a[2] = 1; // a: [ 1, 0, 1 ] b[0] = 1; b[1] = 0; // b: [ 1, 1 ] c = a & b; // c: [ 1, 0, 0 ] </pre> </endcode> <P> <DD><DL> </DL> </DD> </DL> <HR> <A NAME="or(com.trolltech.qt.core.QBitArray)"><!-- --></A><H3> or</H3> <PRE> public void <B>or</B>(<A HREF="../../../../com/trolltech/qt/core/QBitArray.html" title="class in com.trolltech.qt.core">QBitArray</A> other)</PRE> <DL> <DD>Returns a bit array that is the OR of this bit array and <tt>other</tt>. <p> The result has the length of the longest of the two bit arrays, with any missing bits (if one array is shorter than the other) taken to be 0. <p> Example: <p> <code> <pre> QBitArray a(3); QBitArray b(2); QBitArray c; a[0] = 1; a[1] = 0; a[2] = 1; // a: [ 1, 0, 1 ] b[0] = 1; b[1] = 0; // b: [ 1, 1 ] c = a | b; // c: [ 1, 1, 1 ] </pre> </code> <P> <DD><DL> </DL> </DD> </DL> <HR> <A NAME="set(com.trolltech.qt.core.QBitArray)"><!-- --></A><H3> set</H3> <PRE> public void <B>set</B>(<A HREF="../../../../com/trolltech/qt/core/QBitArray.html" title="class in com.trolltech.qt.core">QBitArray</A> other)</PRE> <DL> <DD>This function sets the contents of this array to the same as <tt>other</tt>s. <P> <DD><DL> </DL> </DD> </DL> <HR> <A NAME="inverted()"><!-- --></A><H3> inverted</H3> <PRE> public <A HREF="../../../../com/trolltech/qt/core/QBitArray.html" title="class in com.trolltech.qt.core">QBitArray</A> <B>inverted</B>()</PRE> <DL> <DD>Returns a bit array that contains the inverted bits of this bit array. <p> Example: <p> <code> <pre> QBitArray a(3); QBitArray b; a[0] = 1; a[1] = 0; a[2] = 1; // a: [ 1, 0, 1 ] b = ~a; // b: [ 0, 1, 0 ] </pre> </code> <P> <DD><DL> </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="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</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="../../../../com/trolltech/qt/core/QBasicTimer.html" title="class in com.trolltech.qt.core"><B>PREV CLASS</B></A> <A HREF="../../../../com/trolltech/qt/core/QBuffer.html" title="class in com.trolltech.qt.core"><B>NEXT CLASS</B></A></FONT></TD> <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> <A HREF="../../../../index.html?com/trolltech/qt/core/QBitArray.html" target="_top"><B>FRAMES</B></A> <A HREF="QBitArray.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: <A HREF="#nested_classes_inherited_from_class_com.trolltech.qt.QSignalEmitter">NESTED</A> | FIELD | <A HREF="#constructor_summary">CONSTR</A> | <A HREF="#method_summary">METHOD</A></FONT></TD> <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> DETAIL: FIELD | <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> </BODY> </HTML>