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