Class TupleHelper

java.lang.Object
org.apache.ignite.table.TupleHelper

public final class TupleHelper extends Object
Utility class to provide direct access to internals of TupleImpl.
  • 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 of IgniteNameUtils.parseIdentifier(String)).
      defaultValue - A value to return in case tuple doesn't have column with given name.
      Returns:
      A value from a tuple.