public final class BsonRegularExpression extends BsonValue
Constructor and Description |
---|
BsonRegularExpression(String pattern)
Creates a new instance with no options set.
|
BsonRegularExpression(String pattern,
String options)
Creates a new instance
|
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object o) |
BsonType |
getBsonType()
Gets the BSON type of this value.
|
String |
getOptions()
Gets the options for the regular expression
|
String |
getPattern()
Gets the regex pattern.
|
int |
hashCode() |
String |
toString() |
asArray, 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
public BsonRegularExpression(String pattern, String options)
pattern
- the regular expression Pattern
options
- the options for the regular expressionpublic BsonType getBsonType()
BsonValue
getBsonType
in class BsonValue
public String getPattern()
public String getOptions()