public static final class FieldMaskUtil.MergeOptions extends Object
Constructor and Description |
---|
MergeOptions() |
Modifier and Type | Method and Description |
---|---|
boolean |
replaceMessageFields()
Whether to replace message fields (i.e., discard existing content in
destination message fields) when merging.
|
boolean |
replacePrimitiveFields()
Whether to replace primitive (non-repeated and non-message) fields in
destination message fields with the source primitive fields (i.e., if the
field is set in the source, the value is copied to the
destination; if the field is unset in the source, the field is cleared
from the destination) when merging.
|
boolean |
replaceRepeatedFields()
Whether to replace repeated fields (i.e., discard existing content in
destination repeated fields) when merging.
|
void |
setReplaceMessageFields(boolean value) |
void |
setReplacePrimitiveFields(boolean value) |
void |
setReplaceRepeatedFields(boolean value) |
public boolean replaceMessageFields()
public boolean replaceRepeatedFields()
public boolean replacePrimitiveFields()
Default behavior is to always set the value of the source primitive field to the destination primitive field, and if the source field is unset, the default value of the source field is copied to the destination.
public void setReplaceMessageFields(boolean value)
public void setReplaceRepeatedFields(boolean value)
public void setReplacePrimitiveFields(boolean value)