Package org.apache.ignite.table
Class TupleHelper
java.lang.Object
org.apache.ignite.table.TupleHelper
Utility class to provide direct access to internals of
TupleImpl.-
Method Summary
Modifier and TypeMethodDescriptionstatic <T> TvalueOrDefault(Tuple tuple, String normalizedName, T defaultValue) Returns value from a given tuple which corresponds to a specified column.
-
Method Details
-
valueOrDefault
@Nullable public static <T> T valueOrDefault(Tuple tuple, String normalizedName, @Nullable T defaultValue) Returns value from a given tuple which corresponds to a specified column.Given name is expected to be normalized, thus it's up to caller to invoke
IgniteNameUtils.parseIdentifier(String)prior passing the name to this method.- Type Parameters:
T- A type of the returned value.- Parameters:
tuple- A tuple to get value from.normalizedName- A column name that is considered to be normalized (e.g result ofIgniteNameUtils.parseIdentifier(String)).defaultValue- A value to return in case tuple doesn't have column with given name.- Returns:
- A value from a tuple.
-