Class ReplaceExpression


  • public class ReplaceExpression
    extends Expression
    Defines expressions for $replaceAll and $replaceOne
    Since:
    2.1
    • Constructor Detail

      • ReplaceExpression

        public ReplaceExpression​(String operator,
                                 Expression input,
                                 Expression find,
                                 Expression replacement)
        Parameters:
        operator - the operator name
        input - the input value/source
        find - the search expression
        replacement - the replacement value
        Developer note.
        This is an internal item. Its function and presence are subject to change without warning. Its use is highly discouraged.
    • Method Detail

      • encode

        public void encode​(Mapper mapper,
                           org.bson.BsonWriter writer,
                           org.bson.codecs.EncoderContext encoderContext)
        Overrides:
        encode in class Expression
        Parameters:
        mapper - the mapper
        writer - the writer
        encoderContext - the context