Interface Value
- All Known Implementing Classes:
MessageValue,ObjectValue
public interface Value
Value is a wrapper around a protobuf value that provides helper methods for accessing the
value.-
Method Summary
Modifier and TypeMethodDescriptionmapValue()Get the underlying value as a map.com.google.protobuf.MessageGet the underlying value as aMessagetype.Get the underlying value as a list.<T> TGet the underlying value and cast it to the class type.
-
Method Details
-
messageValue
@Nullable com.google.protobuf.Message messageValue()Get the underlying value as aMessagetype.- Returns:
- The underlying
Messagevalue. null if the underlying value is not aMessagetype.
-
value
Get the underlying value and cast it to the class type.- Type Parameters:
T- The class type.- Parameters:
clazz- The inferred class.- Returns:
- The value casted to the inferred class type.
-
repeatedValue
Get the underlying value as a list.- Returns:
- The underlying value as a list. Empty list is returned if the underlying type is not a list.
-
mapValue
Get the underlying value as a map.- Returns:
- The underlying value as a map. Empty map is returned if the underlying type is not a list.
-