Package org.bson

Class BsonBoolean

  • All Implemented Interfaces:
    <BsonBoolean>

    public final class BsonBoolean
    extends BsonValue
    implements <BsonBoolean>
    A representation of the BSON Boolean type.
    Since:
    3.0
    • Constructor Detail

      • BsonBoolean

        public BsonBoolean​(boolean value)
        Construct a new instance with the given value.
        Parameters:
        value - the value
    • Method Detail

      • valueOf

        public static BsonBoolean valueOf​(boolean value)
        Returns a BsonBoolean instance representing the specified boolean value.
        Parameters:
        value - a boolean value.
        Returns:
        TRUE if value is true, FALSE if value is false
      • getBsonType

        public BsonType getBsonType()
        Description copied from class: BsonValue
        Gets the BSON type of this value.
        Specified by:
        getBsonType in class BsonValue
        Returns:
        the BSON type, which may not be null (but may be BSONType.NULL)
      • getValue

        public boolean getValue()
        Gets the boolean value.
        Returns:
        the value
      • equals

        public boolean equals​( o)
        Overrides:
         in class 
      • hashCode

        public int hashCode()
        Overrides:
         in class 
      • toString

        public  toString()
        Overrides:
         in class