-
public final class UnsetValue
A factory of Values representing default states of Protobuf message fields.
This class does not instantiate default values of Protobuf messages. It merely creates instances of Value which represent values of Protobuf message fields, which are not set.
-
-
Method Summary
-
-
Method Detail
-
forField
static Optional<Value> forField(Field field)
Obtains an unset value for the given field.
If a field is a number or a
{@code bool}
, it is impossible to tell if it's set or not. In the binary representation, the{@code 0}
and{@code false}
values may either be explicitly set or just be the default values. For these cases, and only for these cases, the method returns{@code Optional.empty()}
.
-
-
-
-