📄 boolean.html
字号:
</TABLE><A NAME="TRUE"><!-- --></A><H3>TRUE</H3><PRE>public static final <A HREF="../../java/lang/Boolean.html">Boolean</A> <B>TRUE</B></PRE><DL><DD>The <code>Boolean</code> object corresponding to the primitive value <code>true</code>.</DL><HR><A NAME="FALSE"><!-- --></A><H3>FALSE</H3><PRE>public static final <A HREF="../../java/lang/Boolean.html">Boolean</A> <B>FALSE</B></PRE><DL><DD>The <code>Boolean</code> object corresponding to the primitive value <code>false</code>.</DL><HR><A NAME="TYPE"><!-- --></A><H3>TYPE</H3><PRE>public static final <A HREF="../../java/lang/Class.html">Class</A> <B>TYPE</B></PRE><DL><DD>The Class object representing the primitive type boolean.<DD><DL><DT><B>Since: </B><DD>JDK1.1</DD></DL></DD></DL><!-- ========= CONSTRUCTOR DETAIL ======== --><A NAME="constructor_detail"><!-- --></A><TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%"><TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"><TD COLSPAN=1><FONT SIZE="+2"><B>Constructor Detail</B></FONT></TD></TR></TABLE><A NAME="Boolean(boolean)"><!-- --></A><H3>Boolean</H3><PRE>public <B>Boolean</B>(boolean value)</PRE><DL><DD>Allocates a <code>Boolean</code> object representing the <code>value</code> argument.<DD><DL><DT><B>Parameters:</B><DD><CODE>value</CODE> - the value of the <code>Boolean</code>.</DL></DD></DL><HR><A NAME="Boolean(java.lang.String)"><!-- --></A><H3>Boolean</H3><PRE>public <B>Boolean</B>(<A HREF="../../java/lang/String.html">String</A> s)</PRE><DL><DD>Allocates a <code>Boolean</code> object representing the value <code>true</code> if the string argument is not <code>null</code> and is equal, ignoring case, to the string <code>"true"</code>. Otherwise, allocate a <code>Boolean</code> object representing the value <code>false</code>. Examples:<p> <tt>new Boolean("True")</tt> produces a <tt>Boolean</tt> object that represents <tt>true</tt>.<br> <tt>new Boolean("yes")</tt> produces a <tt>Boolean</tt> object that represents <tt>false</tt>.<DD><DL><DT><B>Parameters:</B><DD><CODE>s</CODE> - the string to be converted to a <code>Boolean</code>.</DL></DD></DL><!-- ============ METHOD DETAIL ========== --><A NAME="method_detail"><!-- --></A><TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%"><TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"><TD COLSPAN=1><FONT SIZE="+2"><B>Method Detail</B></FONT></TD></TR></TABLE><A NAME="booleanValue()"><!-- --></A><H3>booleanValue</H3><PRE>public boolean <B>booleanValue</B>()</PRE><DL><DD>Returns the value of this <tt>Boolean</tt> object as a boolean primitive.<DD><DL></DL></DD><DD><DL><DT><B>Returns:</B><DD>the primitive <code>boolean</code> value of this object.</DL></DD></DL><HR><A NAME="valueOf(java.lang.String)"><!-- --></A><H3>valueOf</H3><PRE>public static <A HREF="../../java/lang/Boolean.html">Boolean</A> <B>valueOf</B>(<A HREF="../../java/lang/String.html">String</A> s)</PRE><DL><DD>Returns a <code>Boolean</code> with a value represented by the specified String. The <code>Boolean</code> returned represents the value <code>true</code> if the string argument is not <code>null</code> and is equal, ignoring case, to the string <code>"true"</code>. <p> Example: <tt>Boolean.valueOf("True")</tt> returns <tt>true</tt>.<br> Example: <tt>Boolean.valueOf("yes")</tt> returns <tt>false</tt>.<DD><DL></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>s</CODE> - a string.<DT><B>Returns:</B><DD>the <code>Boolean</code> value represented by the string.</DL></DD></DL><HR><A NAME="toString()"><!-- --></A><H3>toString</H3><PRE>public <A HREF="../../java/lang/String.html">String</A> <B>toString</B>()</PRE><DL><DD>Returns a String object representing this Boolean's value. If this object represents the value <code>true</code>, a string equal to <code>"true"</code> is returned. Otherwise, a string equal to <code>"false"</code> is returned.<DD><DL><DT><B>Overrides:</B><DD><CODE><A HREF="../../java/lang/Object.html#toString()">toString</A></CODE> in class <CODE><A HREF="../../java/lang/Object.html">Object</A></CODE></DL></DD><DD><DL><DT><B>Returns:</B><DD>a string representation of this object.</DL></DD></DL><HR><A NAME="hashCode()"><!-- --></A><H3>hashCode</H3><PRE>public int <B>hashCode</B>()</PRE><DL><DD>Returns a hash code for this <tt>Boolean</tt> object.<DD><DL><DT><B>Overrides:</B><DD><CODE><A HREF="../../java/lang/Object.html#hashCode()">hashCode</A></CODE> in class <CODE><A HREF="../../java/lang/Object.html">Object</A></CODE></DL></DD><DD><DL><DT><B>Returns:</B><DD>the integer <tt>1231</tt> if this object represents <tt>true</tt>; returns the integer <tt>1237</tt> if this object represents <tt>false</tt>.</DL></DD></DL><HR><A NAME="equals(java.lang.Object)"><!-- --></A><H3>equals</H3><PRE>public boolean <B>equals</B>(<A HREF="../../java/lang/Object.html">Object</A> obj)</PRE><DL><DD>Returns <code>true</code> if and only if the argument is not <code>null</code> and is a <code>Boolean </code>object that represents the same <code>boolean</code> value as this object.<DD><DL><DT><B>Overrides:</B><DD><CODE><A HREF="../../java/lang/Object.html#equals(java.lang.Object)">equals</A></CODE> in class <CODE><A HREF="../../java/lang/Object.html">Object</A></CODE></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>obj</CODE> - the object to compare with.<DT><B>Returns:</B><DD><code>true</code> if the Boolean objects represent the same value; <code>false</code> otherwise.</DL></DD></DL><HR><A NAME="getBoolean(java.lang.String)"><!-- --></A><H3>getBoolean</H3><PRE>public static boolean <B>getBoolean</B>(<A HREF="../../java/lang/String.html">String</A> name)</PRE><DL><DD>Returns <code>true</code> if and only if the system property named by the argument exists and is equal to the string <code>"true"</code>. (Beginning with version 1.0.2 of the Java<font size="-2"><sup>TM</sup></font> platform, the test of this string is case insensitive.) A system property is accessible through <code>getProperty</code>, a method defined by the <code>System</code> class. <p> If there is no property with the specified name, or if the specified name is empty or null, then <code>false</code> is returned.<DD><DL></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>name</CODE> - the system property name.<DT><B>Returns:</B><DD>the <code>boolean</code> value of the system property.<DT><B>See Also: </B><DD><A HREF="../../java/lang/System.html#getProperty(java.lang.String)"><CODE>System.getProperty(java.lang.String)</CODE></A>, <A HREF="../../java/lang/System.html#getProperty(java.lang.String, java.lang.String)"><CODE>System.getProperty(java.lang.String, java.lang.String)</CODE></A></DL></DD></DL><!-- ========= END OF CLASS DATA ========= --><HR><!-- ========== START OF NAVBAR ========== --><A NAME="navbar_bottom"><!-- --></A><TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0"><TR><TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1"><A NAME="navbar_bottom_firstrow"><!-- --></A><TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3"> <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="class-use/Boolean.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A> </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-files/index-1.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><b>Java<sup><font size=-2>TM</font></sup> 2 Platform<br>Std. Ed. v1.3</b></EM></TD></TR><TR><TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> PREV CLASS <A HREF="../../java/lang/Byte.html"><B>NEXT CLASS</B></A></FONT></TD><TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> <A HREF="../../index.html" TARGET="_top"><B>FRAMES</B></A> <A HREF="Boolean.html" TARGET="_top"><B>NO FRAMES</B></A></FONT></TD></TR><TR><TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> SUMMARY: INNER | <A HREF="#field_summary">FIELD</A> | <A HREF="#constructor_summary">CONSTR</A> | <A HREF="#method_summary">METHOD</A></FONT></TD><TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">DETAIL: <A HREF="#field_detail">FIELD</A> | <A HREF="#constructor_detail">CONSTR</A> | <A HREF="#method_detail">METHOD</A></FONT></TD></TR></TABLE><!-- =========== END OF NAVBAR =========== --><HR><font size="-1"><a href="http://java.sun.com/cgi-bin/bugreport.cgi">Submit a bug or feature</a><br>For further API reference and developer documentation, see <a href="http://java.sun.com/products/jdk/1.3/devdocs-vs-specs.html">Java 2 SDK SE Developer Documentation</a>. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples. <p>Java, Java 2D, and JDBC are trademarks or registered trademarks of Sun Microsystems, Inc. in the US and other countries.<br>Copyright 1993-2000 Sun Microsystems, Inc. 901 San Antonio Road<br>Palo Alto, California, 94303, U.S.A. All Rights Reserved.</font></BODY></HTML>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -