Boolean Constructors
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Overloads
Boolean(Boolean) |
Allocates a |
Boolean(String) |
Allocates a |
Boolean(Boolean)
Allocates a Boolean
object representing the
value
argument.
[Android.Runtime.Register(".ctor", "(Z)V", "")]
public Boolean (bool value);
[<Android.Runtime.Register(".ctor", "(Z)V", "")>]
new Java.Lang.Boolean : bool -> Java.Lang.Boolean
Parameters
- value
- Boolean
the value of the Boolean
.
- Attributes
Remarks
Allocates a Boolean
object representing the value
argument.
This member is deprecated. It is rarely appropriate to use this constructor. The static factory #valueOf(boolean)
is generally a better choice, as it is likely to yield significantly better space and time performance. Also consider using the final fields #TRUE
and #FALSE
if possible.
Java documentation for java.lang.Boolean.Boolean(boolean)
.
Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.
Applies to
Boolean(String)
Allocates a Boolean
object representing the value
true
if the string argument is not null
and is equal, ignoring case, to the string "true"
.
[Android.Runtime.Register(".ctor", "(Ljava/lang/String;)V", "")]
public Boolean (string? s);
[<Android.Runtime.Register(".ctor", "(Ljava/lang/String;)V", "")>]
new Java.Lang.Boolean : string -> Java.Lang.Boolean
Parameters
- s
- String
the string to be converted to a Boolean
.
- Attributes
Remarks
Allocates a Boolean
object representing the value true
if the string argument is not null
and is equal, ignoring case, to the string "true"
. Otherwise, allocates a Boolean
object representing the value false
.
This member is deprecated. It is rarely appropriate to use this constructor. Use #parseBoolean(String)
to convert a string to a boolean
primitive, or use #valueOf(String)
to convert a string to a Boolean
object.
Java documentation for java.lang.Boolean.Boolean(java.lang.String)
.
Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.