public static class StringOperators.ReplaceAll extends Object
AggregationExpression for $replaceAll which replaces all instances of a search string in an input
string with a replacement string. | Modifier and Type | Class and Description |
|---|---|
protected static class |
AbstractAggregationExpression.Expand
Expand a nested list of values to single entries or keep the list.
|
| Modifier | Constructor and Description |
|---|---|
protected |
ReplaceAll(Object value) |
| Modifier and Type | Method and Description |
|---|---|
protected List<Object> |
append(Object value) |
protected List<Object> |
append(Object value,
AbstractAggregationExpression.Expand expandList) |
protected Map<String,Object> |
append(String key,
Object value) |
protected Map<String,Object> |
appendAt(int index,
String key,
Object value)
Append the given key at the position in the underlying
LinkedHashMap. |
protected Map<String,Object> |
argumentMap()
Get the argument map.
|
protected static List<Field> |
asFields(String... fieldRefs) |
protected boolean |
contains(Object key)
Check if the given key is available.
|
StringOperators.ReplaceAll |
find(String value)
The string to search for within the given input field.
|
StringOperators.ReplaceAll |
findValueOf(AggregationExpression expression)
Specify the
AggregationExpression evaluating to the string to search for within the given input field. |
StringOperators.ReplaceAll |
findValueOf(String fieldReference)
Specify the reference to the
field holding the string to search for within the given input field. |
protected <T> T |
get(int index)
Get the value at a given index.
|
protected <T> T |
get(Object key)
Get the value for a given key.
|
protected String |
getMongoMethod() |
protected Map<String,Object> |
remove(String key) |
StringOperators.ReplaceAll |
replacement(String replacement)
The string to use to replace the first matched instance of
find in input. |
StringOperators.ReplaceAll |
replacementValueOf(AggregationExpression expression)
Specifies the
AggregationExpression evaluating to the string to use to replace the first matched instance
of find in input. |
StringOperators.ReplaceAll |
replacementValueOf(String fieldReference)
Specifies the reference to the
field holding the string to use to replace the first matched
instance of find in input. |
org.bson.Document |
toDocument(AggregationOperationContext context)
|
org.bson.Document |
toDocument(Object value,
AggregationOperationContext context) |
static StringOperators.ReplaceAll |
value(String value)
Creates new
StringOperators.ReplaceAll using the given as input. |
static StringOperators.ReplaceAll |
valueOf(AggregationExpression expression)
Creates new
StringOperators.ReplaceAll using the result of the provided AggregationExpression as input
value. |
static StringOperators.ReplaceAll |
valueOf(String fieldReference)
Creates new
StringOperators.ReplaceAll using the value of the provided fieldReference as input
value. |
protected List<Object> |
values() |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitfrom, toDocumentcreate, createprotected ReplaceAll(Object value)
public static StringOperators.ReplaceAll value(String value)
StringOperators.ReplaceAll using the given as input.value - must not be null.StringOperators.ReplaceOne.public static StringOperators.ReplaceAll valueOf(String fieldReference)
StringOperators.ReplaceAll using the value of the provided fieldReference as input
value.fieldReference - must not be null.StringOperators.ReplaceAll.public static StringOperators.ReplaceAll valueOf(AggregationExpression expression)
StringOperators.ReplaceAll using the result of the provided AggregationExpression as input
value.expression - must not be null.StringOperators.ReplaceAll.public StringOperators.ReplaceAll replacement(String replacement)
find in input.replacement - must not be null.StringOperators.ReplaceAll.public StringOperators.ReplaceAll replacementValueOf(String fieldReference)
field holding the string to use to replace the first matched
instance of find in input.fieldReference - must not be null.StringOperators.ReplaceAll.public StringOperators.ReplaceAll replacementValueOf(AggregationExpression expression)
AggregationExpression evaluating to the string to use to replace the first matched instance
of find in input.expression - must not be null.StringOperators.ReplaceAll.public StringOperators.ReplaceAll find(String value)
value - must not be null.StringOperators.ReplaceAll.public StringOperators.ReplaceAll findValueOf(String fieldReference)
field holding the string to search for within the given input field.fieldReference - must not be null.StringOperators.ReplaceAll.public StringOperators.ReplaceAll findValueOf(AggregationExpression expression)
AggregationExpression evaluating to the string to search for within the given input field.expression - must not be null.StringOperators.ReplaceAll.protected String getMongoMethod()
public org.bson.Document toDocument(AggregationOperationContext context)
AggregationExpressiontoDocument in interface AggregationExpressioncontext - must not be null.Document) form of the expression.public org.bson.Document toDocument(Object value, AggregationOperationContext context)
protected List<Object> append(Object value, AbstractAggregationExpression.Expand expandList)
protected Map<String,Object> appendAt(int index, String key, Object value)
LinkedHashMap.index - key - value - protected <T> T get(int index)
T - index - protected <T> T get(Object key)
T - key - protected boolean contains(Object key)
key - Copyright © 2011–2022 Pivotal Software, Inc.. All rights reserved.