Class ProtobufFunction

java.lang.Object
io.deephaven.protobuf.ProtobufFunction

@Immutable public abstract class ProtobufFunction extends Object
Encapsulates the logic to extract a result from a Message.
  • Constructor Details

    • ProtobufFunction

      public ProtobufFunction()
  • Method Details

    • unnamed

      public static ProtobufFunction unnamed(TypedFunction<com.google.protobuf.Message> f)
      Creates the unnamed protobuf function. Equivalent to of(FieldPath.empty(), f).
      Parameters:
      f - the function
      Returns:
      the unnamed protobuf function
    • of

      public static ProtobufFunction of(FieldPath path, TypedFunction<com.google.protobuf.Message> f)
      Creates the protobuf function.
      Parameters:
      path - the field path
      f - the function
      Returns:
      the protobuf function
    • path

      @Parameter public abstract FieldPath path()
      The path that function() uses to produce its result.
      Returns:
      the path
    • function

      @Parameter public abstract TypedFunction<com.google.protobuf.Message> function()
      The function to extract a result from a Message.
      Returns:
      the function