public final class FieldMasks
extends java.lang.Object
FieldMask
and processing them
against instances of Message
.Modifier and Type | Method and Description |
---|---|
static <M extends com.google.protobuf.Message> |
applyMask(com.google.protobuf.FieldMask mask,
java.util.Collection<M> messages)
Applies the given
FieldMask to given collection of Message s. |
static <M extends com.google.protobuf.Message> |
applyMask(com.google.protobuf.FieldMask mask,
M message)
Applies the
FieldMask to the given Message
if the mask parameter is valid. |
@Nonnull public static <M extends com.google.protobuf.Message> java.util.Collection<M> applyMask(com.google.protobuf.FieldMask mask, java.util.Collection<M> messages)
FieldMask
to given collection of Message
s.
Does not change the Collection
itself.
If the FieldMask
instance contains invalid field declarations, they are
ignored and do not affect the execution result.
mask
- FieldMask
to apply to each item of the input Collection
.messages
- Message
s to filter.FieldMask
appliedpublic static <M extends com.google.protobuf.Message> M applyMask(com.google.protobuf.FieldMask mask, M message)
FieldMask
to the given Message
if the mask
parameter is valid.
If the FieldMask
instance contains invalid field declarations,
they are ignored and do not affect the execution result.
mask
- the FieldMask
to apply.message
- the Message
to apply given mask to.mask
is valid, original message otherwise.