IT. Expert System.

Android Reference

Boolean


java.lang

Class Boolean

    • Field Summary

      Fields
      Modifier and Type Field and Description
      static Boolean FALSE
      The Boolean object that represents the primitive value false.
      static Boolean TRUE
      The Boolean object that represents the primitive value true.
      static Class<Boolean> TYPE
      The Class object that represents the primitive type boolean.
    • Constructor Summary

      Constructors
      Constructor and Description
      Boolean(boolean value)
      Constructs a new Boolean with the specified primitive boolean value.
      Boolean(String string)
      Constructs a new Boolean with its boolean value specified by string.
    • Method Summary

      Methods
      Modifier and Type Method and Description
      boolean booleanValue()
      Gets the primitive value of this boolean, either true or false.
      static int compare(boolean lhs, boolean rhs)
      Compares two boolean values.
      int compareTo(Boolean that)
      Compares this object to the specified boolean object to determine their relative order.
      boolean equals(Object o)
      Compares this instance with the specified object and indicates if they are equal.
      static boolean getBoolean(String string)
      Returns the boolean value of the system property identified by string.
      int hashCode()
      Returns an integer hash code for this boolean.
      static boolean parseBoolean(String s)
      Parses the specified string as a boolean.
      String toString()
      Returns a string containing a concise, human-readable description of this boolean.
      static String toString(boolean value)
      Converts the specified boolean to its string representation.
      static Boolean valueOf(boolean b)
      Returns a Boolean instance for the specified boolean value.
      static Boolean valueOf(String string)
      Parses the specified string as a boolean value.
    • Field Detail

      • TYPE

        public static final Class<Boolean> TYPE
        The Class object that represents the primitive type boolean.
      • TRUE

        public static final Boolean TRUE
        The Boolean object that represents the primitive value true.
      • FALSE

        public static final Boolean FALSE
        The Boolean object that represents the primitive value false.
    • Constructor Detail

      • Boolean

        public Boolean(String string)
        Constructs a new Boolean with its boolean value specified by string. If string is not null and is equal to "true" using a non-case sensitive comparison, the result will be a Boolean representing the primitive value true, otherwise it will be a Boolean representing the primitive value false.
        Parameters:
        string - the string representing a boolean value.
      • Boolean

        public Boolean(boolean value)
        Constructs a new Boolean with the specified primitive boolean value.
        Parameters:
        value - the primitive boolean value, true or false.
    • Method Detail

      • booleanValue

        public boolean booleanValue()
        Gets the primitive value of this boolean, either true or false.
        Returns:
        this object's primitive value, true or false.
      • equals

        public boolean equals(Object o)
        Compares this instance with the specified object and indicates if they are equal. In order to be equal, o must be an instance of Boolean and have the same boolean value as this object.
        Overrides:
        equals in class Object
        Parameters:
        o - the object to compare this boolean with.
        Returns:
        true if the specified object is equal to this Boolean; false otherwise.
        See Also:
        Object.hashCode()
      • compareTo

        public int compareTo(Boolean that)
        Compares this object to the specified boolean object to determine their relative order.
        Specified by:
        compareTo in interface Comparable<Boolean>
        Parameters:
        that - the boolean object to compare this object to.
        Returns:
        0 if the value of this boolean and the value of that are equal; a positive value if the value of this boolean is true and the value of that is false; a negative value if the value if this boolean is false and the value of that is true.
        Since:
        1.5
        See Also:
        Comparable
      • compare

        public static int compare(boolean lhs,
                  boolean rhs)
        Compares two boolean values.
        Returns:
        0 if lhs = rhs, less than 0 if lhs < rhs, and greater than 0 if lhs > rhs. (Where true > false.)
        Since:
        1.7
      • hashCode

        public int hashCode()
        Returns an integer hash code for this boolean.
        Overrides:
        hashCode in class Object
        Returns:
        this boolean's hash code, which is 1231 for true values and 1237 for false values.
        See Also:
        Object.equals(java.lang.Object)
      • toString

        public String toString()
        Returns a string containing a concise, human-readable description of this boolean.
        Overrides:
        toString in class Object
        Returns:
        "true" if the value of this boolean is true, "false" otherwise.
      • getBoolean

        public static boolean getBoolean(String string)
        Returns the boolean value of the system property identified by string.
        Parameters:
        string - the name of the requested system property.
        Returns:
        true if the system property named by string exists and it is equal to "true" using case insensitive comparison, false otherwise.
        See Also:
        System.getProperty(String)
      • parseBoolean

        public static boolean parseBoolean(String s)
        Parses the specified string as a boolean.
        Parameters:
        s - the string representation of a boolean value.
        Returns:
        true if s is not null and is equal to "true" using case insensitive comparison, false otherwise.
        Since:
        1.5
      • toString

        public static String toString(boolean value)
        Converts the specified boolean to its string representation.
        Parameters:
        value - the boolean to convert.
        Returns:
        "true" if value is true, "false" otherwise.
      • valueOf

        public static Boolean valueOf(String string)
        Parses the specified string as a boolean value.
        Parameters:
        string - the string representation of a boolean value.
        Returns:
        Boolean.TRUE if string is equal to "true" using case insensitive comparison, Boolean.FALSE otherwise.
        See Also:
        parseBoolean(String)
      • valueOf

        public static Boolean valueOf(boolean b)
        Returns a Boolean instance for the specified boolean value.

        If it is not necessary to get a new Boolean instance, it is recommended to use this method instead of the constructor, since it returns its static instances, which results in better performance.

        Parameters:
        b - the boolean to convert to a Boolean.
        Returns:
        Boolean.TRUE if b is equal to true, Boolean.FALSE otherwise.


Content

Android Reference

Java basics

Java Enterprise Edition (EE)

Java Standard Edition (SE)

SQL

HTML

PHP

CSS

Java Script

MYSQL

JQUERY

VBS

REGEX

C

C++

C#

Design patterns

RFC (standard status)

RFC (proposed standard status)

RFC (draft standard status)

RFC (informational status)

RFC (experimental status)

RFC (best current practice status)

RFC (historic status)

RFC (unknown status)

IT dictionary

License.
All information of this service is derived from the free sources and is provided solely in the form of quotations. This service provides information and interfaces solely for the familiarization (not ownership) and under the "as is" condition.
Copyright 2016 © ELTASK.COM. All rights reserved.
Site is optimized for mobile devices.
Downloads: 173 / . Delta: 0.03333 с