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 Type
    Method
    Description
    Get the underlying value as a map.
    com.google.protobuf.Message
    Get the underlying value as a Message type.
    Get the underlying value as a list.
    <T> T
    value(Class<T> clazz)
    Get the underlying value and cast it to the class type.
  • Method Details

    • messageValue

      @Nullable com.google.protobuf.Message messageValue()
      Get the underlying value as a Message type.
      Returns:
      The underlying Message value. null if the underlying value is not a Message type.
    • value

      <T> T value(Class<T> clazz)
      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

      List<Value> 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

      Map<Value,Value> 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.