Package io.deephaven.protobuf
Class ProtobufFunction
java.lang.Object
io.deephaven.protobuf.ProtobufFunction
Encapsulates the logic to extract a result from a
Message
.-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionabstract TypedFunction<com.google.protobuf.Message>
function()
The function to extract a result from aMessage
.static ProtobufFunction
of
(FieldPath path, TypedFunction<com.google.protobuf.Message> f) Creates the protobuf function.abstract FieldPath
path()
The path thatfunction()
uses to produce its result.static ProtobufFunction
unnamed
(TypedFunction<com.google.protobuf.Message> f) Creates the unnamed protobuf function.
-
Constructor Details
-
ProtobufFunction
public ProtobufFunction()
-
-
Method Details
-
unnamed
Creates the unnamed protobuf function. Equivalent toof(FieldPath.empty(), f)
.- Parameters:
f
- the function- Returns:
- the unnamed protobuf function
-
of
Creates the protobuf function.- Parameters:
path
- the field pathf
- the function- Returns:
- the protobuf function
-
path
The path thatfunction()
uses to produce its result.- Returns:
- the path
-
function
The function to extract a result from aMessage
.- Returns:
- the function
-