Modifier and Type | Method and Description |
---|---|
static Object |
fromProto(Message value,
Descriptors.Descriptor descriptor)
Convert a field's value from a message to a
Tuple item. |
static boolean |
fromProto(TupleFieldsProto.NullableBool proto)
Convert a Protobuf
NullableBool to a Java boolean . |
static ByteString |
fromProto(TupleFieldsProto.NullableBytes proto)
Convert a Protobuf
NullableBytes to a Java ByteString . |
static double |
fromProto(TupleFieldsProto.NullableDouble proto)
Convert a Protobuf
NullableDouble to a Java double . |
static float |
fromProto(TupleFieldsProto.NullableFloat proto)
Convert a Protobuf
NullableFloat to a Java float . |
static int |
fromProto(TupleFieldsProto.NullableInt32 proto)
Convert a Protobuf
NullableInt32 to a Java int . |
static long |
fromProto(TupleFieldsProto.NullableInt64 proto)
Convert a Protobuf
NullableInt64 to a Java long . |
static String |
fromProto(TupleFieldsProto.NullableString proto)
Convert a Protobuf
NullableString to a Java String . |
static UUID |
fromProto(TupleFieldsProto.UUID proto)
Convert a Protobuf
UUID to a Java UUID . |
static boolean |
isTupleField(Descriptors.Descriptor descriptor)
Test whether a message field's descriptor is one of the special ones.
|
static TupleFieldsProto.NullableBool |
toProto(boolean value)
Convert a Java
boolean to a Protobuf NullableBool . |
static TupleFieldsProto.NullableBytes |
toProto(ByteString value)
Convert a Java
ByteString to a Protobuf NullableBytes . |
static TupleFieldsProto.NullableDouble |
toProto(double value)
Convert a Java
double to a Protobuf NullableDouble . |
static TupleFieldsProto.NullableFloat |
toProto(float value)
Convert a Java
float to a Protobuf NullableFloat . |
static TupleFieldsProto.NullableInt32 |
toProto(int value)
Convert a Java
int to a Protobuf NullableInt32 . |
static TupleFieldsProto.NullableInt64 |
toProto(long value)
Convert a Java
long to a Protobuf NullableInt64 . |
static Message |
toProto(Object value,
Descriptors.Descriptor descriptor)
Convert a field's value from a
Tuple item to a message. |
static TupleFieldsProto.NullableString |
toProto(String value)
Convert a Java
String to a Protobuf NullableString . |
static TupleFieldsProto.UUID |
toProto(UUID uuid)
Convert a Java
UUID to a Protobuf UUID . |
public static boolean isTupleField(@Nonnull Descriptors.Descriptor descriptor)
descriptor
- message descriptor for the fieldtrue
if the field is decoded into a single item in a Tuple
.@Nonnull public static Object fromProto(@Nonnull Message value, @Nonnull Descriptors.Descriptor descriptor)
Tuple
item.value
- value for the fielddescriptor
- message descriptor for the fieldTuple
@Nonnull public static UUID fromProto(@Nonnull TupleFieldsProto.UUID proto)
UUID
to a Java UUID
.proto
- the value of a Protobuf UUID
fieldUUID
public static double fromProto(@Nonnull TupleFieldsProto.NullableDouble proto)
NullableDouble
to a Java double
.proto
- the value of a Protobuf NullableDouble
fielddouble
public static float fromProto(@Nonnull TupleFieldsProto.NullableFloat proto)
NullableFloat
to a Java float
.proto
- the value of a Protobuf NullableFloat
fieldfloat
public static int fromProto(@Nonnull TupleFieldsProto.NullableInt32 proto)
NullableInt32
to a Java int
.proto
- the value of a Protobuf NullableInt32
fieldint
public static long fromProto(@Nonnull TupleFieldsProto.NullableInt64 proto)
NullableInt64
to a Java long
.proto
- the value of a Protobuf NullableInt64
fieldlong
public static boolean fromProto(@Nonnull TupleFieldsProto.NullableBool proto)
NullableBool
to a Java boolean
.proto
- the value of a Protobuf NullableBool
fieldboolean
@Nonnull public static String fromProto(@Nonnull TupleFieldsProto.NullableString proto)
NullableString
to a Java String
.proto
- the value of a Protobuf NullableString
fieldString
@Nonnull public static ByteString fromProto(@Nonnull TupleFieldsProto.NullableBytes proto)
NullableBytes
to a Java ByteString
.proto
- the value of a Protobuf NullableBytes
fieldByteString
@Nonnull public static Message toProto(@Nonnull Object value, @Nonnull Descriptors.Descriptor descriptor)
Tuple
item to a message.value
- value for the fielddescriptor
- message descriptor for the field@Nonnull public static TupleFieldsProto.UUID toProto(@Nonnull UUID uuid)
UUID
to a Protobuf UUID
.uuid
- the Java UUID
UUID
field@Nonnull public static TupleFieldsProto.NullableDouble toProto(double value)
double
to a Protobuf NullableDouble
.value
- the Java double
NullableDouble
field@Nonnull public static TupleFieldsProto.NullableFloat toProto(float value)
float
to a Protobuf NullableFloat
.value
- the Java float
NullableFloat
field@Nonnull public static TupleFieldsProto.NullableInt32 toProto(int value)
int
to a Protobuf NullableInt32
.value
- the Java int
NullableInt32
field@Nonnull public static TupleFieldsProto.NullableInt64 toProto(long value)
long
to a Protobuf NullableInt64
.value
- the Java long
NullableInt64
field@Nonnull public static TupleFieldsProto.NullableBool toProto(boolean value)
boolean
to a Protobuf NullableBool
.value
- the Java boolean
NullableBool
field@Nonnull public static TupleFieldsProto.NullableString toProto(@Nonnull String value)
String
to a Protobuf NullableString
.value
- the Java String
NullableString
field@Nonnull public static TupleFieldsProto.NullableBytes toProto(@Nonnull ByteString value)
ByteString
to a Protobuf NullableBytes
.value
- the Java ByteString
NullableBytes
field