Package org.bson
Class BsonBoolean
- java.lang.Object
- 
- org.bson.BsonValue
- 
- org.bson.BsonBoolean
 
 
- 
- All Implemented Interfaces:
- Comparable<BsonBoolean>
 
 public final class BsonBoolean extends BsonValue implements Comparable<BsonBoolean> A representation of the BSON Boolean type.- Since:
- 3.0
 
- 
- 
Field SummaryFields Modifier and Type Field Description static BsonBooleanFALSEstatic BsonBooleanTRUE
 - 
Constructor SummaryConstructors Constructor Description BsonBoolean(boolean value)Construct a new instance with the given value.
 - 
Method SummaryAll Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description intcompareTo(BsonBoolean o)booleanequals(Object o)BsonTypegetBsonType()Gets the BSON type of this value.booleangetValue()Gets the boolean value.inthashCode()StringtoString()static BsonBooleanvalueOf(boolean value)Returns aBsonBooleaninstance representing the specifiedbooleanvalue.- 
Methods inherited from class org.bson.BsonValueasArray, asBinary, asBoolean, asDateTime, asDBPointer, asDecimal128, asDocument, asDouble, asInt32, asInt64, asJavaScript, asJavaScriptWithScope, asNumber, asObjectId, asRegularExpression, asString, asSymbol, asTimestamp, isArray, isBinary, isBoolean, isDateTime, isDBPointer, isDecimal128, isDocument, isDouble, isInt32, isInt64, isJavaScript, isJavaScriptWithScope, isNull, isNumber, isObjectId, isRegularExpression, isString, isSymbol, isTimestamp
 
- 
 
- 
- 
- 
Field Detail- 
TRUEpublic static final BsonBoolean TRUE 
 - 
FALSEpublic static final BsonBoolean FALSE 
 
- 
 - 
Method Detail- 
valueOfpublic static BsonBoolean valueOf(boolean value) Returns aBsonBooleaninstance representing the specifiedbooleanvalue.
 - 
compareTopublic int compareTo(BsonBoolean o) - Specified by:
- compareToin interface- Comparable<BsonBoolean>
 
 - 
getBsonTypepublic BsonType getBsonType() Description copied from class:BsonValueGets the BSON type of this value.- Specified by:
- getBsonTypein class- BsonValue
- Returns:
- the BSON type, which may not be null (but may be BSONType.NULL)
 
 - 
getValuepublic boolean getValue() Gets the boolean value.- Returns:
- the value
 
 
- 
 
-