Class Tuple

java.lang.Object
io.vertx.rxjava3.sqlclient.Tuple
All Implemented Interfaces:
io.vertx.lang.rx.RxDelegate
Direct Known Subclasses:
Row

public class Tuple extends Object implements io.vertx.lang.rx.RxDelegate
A general purpose tuple.

CAUTION: indexes start at 0, not at 1.

NOTE: This class has been automatically generated from the original non RX-ified interface using Vert.x codegen.

  • Field Details

    • __TYPE_ARG

      public static final io.vertx.lang.rx.TypeArg<Tuple> __TYPE_ARG
    • JSON_NULL

      public static final Object JSON_NULL
      The JSON null literal value.
      It is used to distinguish a JSON null literal value from the Java null value. This is only used when the database supports JSON types.
  • Constructor Details

    • Tuple

      public Tuple(Tuple delegate)
    • Tuple

      public Tuple(Object delegate)
  • Method Details

    • toString

      public String toString()
      Overrides:
      toString in class Object
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • getDelegate

      public Tuple getDelegate()
      Specified by:
      getDelegate in interface io.vertx.lang.rx.RxDelegate
    • tuple

      public static Tuple tuple()
      Returns:
      a new empty tuple
    • from

      public static <T> Tuple from(List<T> list)
      Wrap the provided list with a tuple.
      The list is not copied and is used as store for tuple elements.
      Parameters:
      list -
      Returns:
      the list wrapped as a tuple
    • wrap

      public static <T> Tuple wrap(List<T> list)
      Wrap the provided list with a tuple.
      The list is not copied and is used as store for tuple elements.
      Note: The list might be modified and users should use tuple() if the list is unmodifiable
      Parameters:
      list -
      Returns:
      the list wrapped as a tuple
    • of

      public static Tuple of(Object elt1)
      Create a tuple of one element.
      Parameters:
      elt1 - the first value
      Returns:
      the tuple
    • of

      public static Tuple of(Object elt1, Object elt2)
      Create a tuple of two elements.
      Parameters:
      elt1 - the first value
      elt2 - the second value
      Returns:
      the tuple
    • of

      public static Tuple of(Object elt1, Object elt2, Object elt3)
      Create a tuple of three elements.
      Parameters:
      elt1 - the first value
      elt2 - the second value
      elt3 - the third value
      Returns:
      the tuple
    • of

      public static Tuple of(Object elt1, Object elt2, Object elt3, Object elt4)
      Create a tuple of four elements.
      Parameters:
      elt1 - the first value
      elt2 - the second value
      elt3 - the third value
      elt4 - the fourth value
      Returns:
      the tuple
    • of

      public static Tuple of(Object elt1, Object elt2, Object elt3, Object elt4, Object elt5)
      Create a tuple of five elements.
      Parameters:
      elt1 - the first value
      elt2 - the second value
      elt3 - the third value
      elt4 - the fourth value
      elt5 - the fifth value
      Returns:
      the tuple
    • of

      public static Tuple of(Object elt1, Object elt2, Object elt3, Object elt4, Object elt5, Object elt6)
      Create a tuple of six elements.
      Parameters:
      elt1 - the first value
      elt2 - the second valueg
      elt3 - the third value
      elt4 - the fourth value
      elt5 - the fifth value
      elt6 - the sixth value
      Returns:
      the tuple
    • tuple

      public static Tuple tuple(List<Object> elements)
      Create a tuple with the provided elements list.

      The elements list is not modified.

      Parameters:
      elements - the list of elements
      Returns:
      the tuple
    • getValue

      public Object getValue(int pos)
      Get an object value at pos.
      Parameters:
      pos - the position
      Returns:
      the value
    • getBoolean

      public Boolean getBoolean(int pos)
      Get a boolean value at pos.
      Parameters:
      pos - the position
      Returns:
      the value
    • getByte

      public Byte getByte(int pos)
      Get a byte value at pos.
      Parameters:
      pos - the position
      Returns:
      the value
    • getShort

      public Short getShort(int pos)
      Get a short value at pos.
      Parameters:
      pos - the position
      Returns:
      the value
    • getInteger

      public Integer getInteger(int pos)
      Get an integer value at pos.
      Parameters:
      pos - the position
      Returns:
      the value
    • getLong

      public Long getLong(int pos)
      Get a long value at pos.
      Parameters:
      pos - the position
      Returns:
      the value
    • getFloat

      public Float getFloat(int pos)
      Get a float value at pos.
      Parameters:
      pos - the position
      Returns:
      the value
    • getDouble

      public Double getDouble(int pos)
      Get a double value at pos.
      Parameters:
      pos - the position
      Returns:
      the value
    • getString

      public String getString(int pos)
      Get a string value at pos.
      Parameters:
      pos - the position
      Returns:
      the value
    • getJsonObject

      public JsonObject getJsonObject(int pos)
      Get a value at pos.
      Parameters:
      pos - the position
      Returns:
      the value
    • getJsonArray

      public JsonArray getJsonArray(int pos)
      Get a value at pos.
      Parameters:
      pos - the position
      Returns:
      the value
    • getJson

      public Object getJson(int pos)
      Get a JSON element at pos, the element might be #JSON_NULL null or one of the following types:
      • String
      • Number
      • JsonObject
      • JsonArray
      • Boolean
      Parameters:
      pos - the position
      Returns:
      the value
    • getBuffer

      public Buffer getBuffer(int pos)
      Get a buffer value at pos.
      Parameters:
      pos - the position
      Returns:
      the value
    • addValue

      public Tuple addValue(Object value)
      Add an object value at the end of the tuple.
      Parameters:
      value - the value
      Returns:
      a reference to this, so the API can be used fluently
    • addBoolean

      public Tuple addBoolean(Boolean value)
      Add a boolean value at the end of the tuple.
      Parameters:
      value - the value
      Returns:
      a reference to this, so the API can be used fluently
    • addShort

      public Tuple addShort(Short value)
      Add a short value at the end of the tuple.
      Parameters:
      value - the value
      Returns:
      a reference to this, so the API can be used fluently
    • addInteger

      public Tuple addInteger(Integer value)
      Add an integer value at the end of the tuple.
      Parameters:
      value - the value
      Returns:
      a reference to this, so the API can be used fluently
    • addLong

      public Tuple addLong(Long value)
      Add a long value at the end of the tuple.
      Parameters:
      value - the value
      Returns:
      a reference to this, so the API can be used fluently
    • addFloat

      public Tuple addFloat(Float value)
      Add a float value at the end of the tuple.
      Parameters:
      value - the value
      Returns:
      a reference to this, so the API can be used fluently
    • addDouble

      public Tuple addDouble(Double value)
      Add a double value at the end of the tuple.
      Parameters:
      value - the value
      Returns:
      a reference to this, so the API can be used fluently
    • addString

      public Tuple addString(String value)
      Add a string value at the end of the tuple.
      Parameters:
      value - the value
      Returns:
      a reference to this, so the API can be used fluently
    • addJsonObject

      public Tuple addJsonObject(JsonObject value)
      Add a value at the end of the tuple.
      Parameters:
      value - the value
      Returns:
      a reference to this, so the API can be used fluently
    • addJsonArray

      public Tuple addJsonArray(JsonArray value)
      Add a value at the end of the tuple.
      Parameters:
      value - the value
      Returns:
      a reference to this, so the API can be used fluently
    • addBuffer

      public Tuple addBuffer(Buffer value)
      Add a buffer value at the end of the tuple.
      Parameters:
      value - the value
      Returns:
      a reference to this, so the API can be used fluently
    • get

      public <T> T get(Class<T> type, int position)
      Get the the at the specified position and the specified type.

      The type can be one of the types returned by the row (e.g String.class) or an array of the type (e.g String[].class)).

      Parameters:
      type - the expected value type
      position - the value position
      Returns:
      the value if the value is found or null.
    • size

      public int size()
      Returns:
      the tuple size
    • clear

      public void clear()
    • deepToString

      public String deepToString()
      Returns:
      A String containing the Object value of each element, separated by a comma (,) character
    • from

      public static Tuple from(Object[] array)
      Wrap the provided array with a tuple.
      The array is not copied and is used as store for tuple elements.
      Parameters:
      array -
      Returns:
      the list wrapped as a tuple
    • wrap

      public static Tuple wrap(Object[] array)
      Wrap the provided array with a tuple.
      The array is not copied and is used as store for tuple elements.
      Parameters:
      array -
      Returns:
      the list wrapped as a tuple
    • getNumeric

      public Numeric getNumeric(int pos)
      Get value at pos.
      Parameters:
      pos - the position
      Returns:
      the value
    • getTemporal

      public Temporal getTemporal(int pos)
      Get a Temporal value at pos.
      Parameters:
      pos - the position
      Returns:
      the value
    • getLocalDate

      public LocalDate getLocalDate(int pos)
      Get LocalDate value at pos.

      Target element instance of LocalDateTime will be coerced to LocalDate.

      Parameters:
      pos - the position
      Returns:
      the value
    • getLocalTime

      public LocalTime getLocalTime(int pos)
      Get LocalTime value at pos.

      Target element instance of LocalDateTime will be coerced to LocalTime.

      Parameters:
      pos - the position
      Returns:
      the value
    • getLocalDateTime

      public LocalDateTime getLocalDateTime(int pos)
      Get LocalDateTime value at pos.
      Parameters:
      pos - the position
      Returns:
      the value
    • getOffsetTime

      public OffsetTime getOffsetTime(int pos)
      Get OffsetTime value at pos.

      Target element instance of OffsetDateTime will be coerced to OffsetTime.

      Parameters:
      pos - the position
      Returns:
      the value
    • getOffsetDateTime

      public OffsetDateTime getOffsetDateTime(int pos)
      Get OffsetDateTime value at pos.
      Parameters:
      pos - the position
      Returns:
      the value
    • getUUID

      public UUID getUUID(int pos)
      Get UUID value at pos.
      Parameters:
      pos - the position
      Returns:
      the value
    • getBigDecimal

      public BigDecimal getBigDecimal(int pos)
      Get value at pos.
      Parameters:
      pos - the position
      Returns:
      the value
    • getArrayOfBooleans

      public Boolean[] getArrayOfBooleans(int pos)
      Get an array of Boolean value at pos.

      Target element instance of Object[] will be coerced to Boolean[].

      Parameters:
      pos - the position
      Returns:
      the value
    • getArrayOfBytes

      public Byte[] getArrayOfBytes(int pos)
      Get an array of Byte value at pos.

      Target element instance of Number[] or Object[] will be coerced to Byte[].

      Parameters:
      pos - the position
      Returns:
      the value
    • getArrayOfShorts

      public Short[] getArrayOfShorts(int pos)
      Get an array of Short value at pos.

      Target element instance of Number[] or Object[] will be coerced to Short[].

      Parameters:
      pos - the position
      Returns:
      the value
    • getArrayOfIntegers

      public Integer[] getArrayOfIntegers(int pos)
      Get an array of Integer value at pos.

      Target element instance of Number[] or Object[] will be coerced to Integer[].

      Parameters:
      pos - the position
      Returns:
      the value
    • getArrayOfLongs

      public Long[] getArrayOfLongs(int pos)
      Get an array of Long value at pos.

      Target element instance of Number[] or Object[] will be coerced to Long[].

      Parameters:
      pos - the position
      Returns:
      the value
    • getArrayOfFloats

      public Float[] getArrayOfFloats(int pos)
      Get an array of Float value at pos.

      Target element instance of Number[] or Object[] will be coerced to Float[].

      Parameters:
      pos - the position
      Returns:
      the value
    • getArrayOfDoubles

      public Double[] getArrayOfDoubles(int pos)
      Get an array of Double value at pos.

      Target element instance of Number[] or Object[] will be coerced to Double[].

      Parameters:
      pos - the position
      Returns:
      the value
    • getArrayOfNumerics

      public Numeric[] getArrayOfNumerics(int pos)
      Get an array of value at pos.
      Parameters:
      pos - the column
      Returns:
      the value
    • getArrayOfStrings

      public String[] getArrayOfStrings(int pos)
      Get an array of String value at pos.

      Target element instance of Object[] will be coerced to String[].

      Parameters:
      pos - the position
      Returns:
      the value
    • getArrayOfJsonObjects

      public JsonObject[] getArrayOfJsonObjects(int pos)
      Get an array of value at pos.
      Parameters:
      pos - the position
      Returns:
      the value
    • getArrayOfJsonArrays

      public JsonArray[] getArrayOfJsonArrays(int pos)
      Get an array of value at pos.
      Parameters:
      pos - the position
      Returns:
      the value
    • getArrayOfJsons

      public Object[] getArrayOfJsons(int pos)
      Get an array of JSON elements at pos, the element might be #JSON_NULL null or one of the following types:
      • String
      • Number
      • JsonObject
      • JsonArray
      • Boolean
      Parameters:
      pos - the position
      Returns:
      the value
    • getArrayOfTemporals

      public Temporal[] getArrayOfTemporals(int pos)
      Get an array of value at pos.
      Parameters:
      pos - the position
      Returns:
      the value
    • getArrayOfLocalDates

      public LocalDate[] getArrayOfLocalDates(int pos)
      Get an array of value at pos.

      Target element instance of LocalDateTime[] will be coerced to LocalDate[].

      Parameters:
      pos - the position
      Returns:
      the value
    • getArrayOfLocalTimes

      public LocalTime[] getArrayOfLocalTimes(int pos)
      Get an array of value at pos.

      Target element instance of LocalDateTime[] will be coerced to LocalTime[].

      Parameters:
      pos - the position
      Returns:
      the value
    • getArrayOfLocalDateTimes

      public LocalDateTime[] getArrayOfLocalDateTimes(int pos)
      Get an array of value at pos.
      Parameters:
      pos - the position
      Returns:
      the value
    • getArrayOfOffsetTimes

      public OffsetTime[] getArrayOfOffsetTimes(int pos)
      Get an array of value at pos.

      Target element instance of OffsetDateTime[] will be coerced to OffsetTime[].

      Parameters:
      pos - the position
      Returns:
      the value
    • getArrayOfOffsetDateTimes

      public OffsetDateTime[] getArrayOfOffsetDateTimes(int pos)
      Get an array of value at pos.
      Parameters:
      pos - the position
      Returns:
      the value
    • getArrayOfUUIDs

      public UUID[] getArrayOfUUIDs(int pos)
      Get an array of value at pos.
      Parameters:
      pos - the column
      Returns:
      the value
    • getArrayOfBigDecimals

      public BigDecimal[] getArrayOfBigDecimals(int pos)
      Get an array of value at pos.
      Parameters:
      pos - the column
      Returns:
      the value
    • addTemporal

      public Tuple addTemporal(Temporal value)
      Add a Temporal value at the end of the tuple.
      Parameters:
      value - the value
      Returns:
      a reference to this, so the API can be used fluently
    • addLocalDate

      public Tuple addLocalDate(LocalDate value)
      Add a LocalDate value at the end of the tuple.
      Parameters:
      value - the value
      Returns:
      a reference to this, so the API can be used fluently
    • addLocalTime

      public Tuple addLocalTime(LocalTime value)
      Add a LocalTime value at the end of the tuple.
      Parameters:
      value - the value
      Returns:
      a reference to this, so the API can be used fluently
    • addLocalDateTime

      public Tuple addLocalDateTime(LocalDateTime value)
      Add a LocalDateTime value at the end of the tuple.
      Parameters:
      value - the value
      Returns:
      a reference to this, so the API can be used fluently
    • addOffsetTime

      public Tuple addOffsetTime(OffsetTime value)
      Add a OffsetTime value at the end of the tuple.
      Parameters:
      value - the value
      Returns:
      a reference to this, so the API can be used fluently
    • addOffsetDateTime

      public Tuple addOffsetDateTime(OffsetDateTime value)
      Add a OffsetDateTime value at the end of the tuple.
      Parameters:
      value - the value
      Returns:
      a reference to this, so the API can be used fluently
    • addUUID

      public Tuple addUUID(UUID value)
      Add a UUID value at the end of the tuple.
      Parameters:
      value - the value
      Returns:
      a reference to this, so the API can be used fluently
    • addBigDecimal

      public Tuple addBigDecimal(BigDecimal value)
      Add a value at the end of the tuple.
      Parameters:
      value - the value
      Returns:
      a reference to this, so the API can be used fluently
    • addArrayOfBoolean

      public Tuple addArrayOfBoolean(Boolean[] value)
      Add an array of Boolean value at the end of the tuple.
      Parameters:
      value - the value
      Returns:
      a reference to this, so the API can be used fluently
    • addArrayOfShort

      public Tuple addArrayOfShort(Short[] value)
      Add an array of Short value at the end of the tuple.
      Parameters:
      value - the value
      Returns:
      a reference to this, so the API can be used fluently
    • addArrayOfInteger

      public Tuple addArrayOfInteger(Integer[] value)
      Add an array of Integer value at the end of the tuple.

      Target element instance of Number[] will be coerced to Integer[].

      Parameters:
      value - the value
      Returns:
      a reference to this, so the API can be used fluently
    • addArrayOfLong

      public Tuple addArrayOfLong(Long[] value)
      Add an array of Long value at the end of the tuple.
      Parameters:
      value - the value
      Returns:
      a reference to this, so the API can be used fluently
    • addArrayOfFloat

      public Tuple addArrayOfFloat(Float[] value)
      Add an array of Float value at the end of the tuple.
      Parameters:
      value - the value
      Returns:
      a reference to this, so the API can be used fluently
    • addArrayOfDouble

      public Tuple addArrayOfDouble(Double[] value)
      Add an array of Double value at the end of the tuple.
      Parameters:
      value - the value
      Returns:
      a reference to this, so the API can be used fluently
    • addArrayOfString

      public Tuple addArrayOfString(String[] value)
      Add an array of String value at the end of the tuple.
      Parameters:
      value - the value
      Returns:
      a reference to this, so the API can be used fluently
    • addArrayOfJsonObject

      public Tuple addArrayOfJsonObject(JsonObject[] value)
      Add an array of value at the end of the tuple.
      Parameters:
      value - the value
      Returns:
      a reference to this, so the API can be used fluently
    • addArrayOfJsonArray

      public Tuple addArrayOfJsonArray(JsonArray[] value)
      Add an array of value at the end of the tuple.
      Parameters:
      value - the value
      Returns:
      a reference to this, so the API can be used fluently
    • addArrayOfTemporal

      public Tuple addArrayOfTemporal(Temporal[] value)
      Add an array of value at the end of the tuple.
      Parameters:
      value - the value
      Returns:
      a reference to this, so the API can be used fluently
    • addArrayOfLocalDate

      public Tuple addArrayOfLocalDate(LocalDate[] value)
      Add an array of value at the end of the tuple.
      Parameters:
      value - the value
      Returns:
      a reference to this, so the API can be used fluently
    • addArrayOfLocalTime

      public Tuple addArrayOfLocalTime(LocalTime[] value)
      Add an array of value at the end of the tuple.
      Parameters:
      value - the value
      Returns:
      a reference to this, so the API can be used fluently
    • addArrayOfLocalDateTime

      public Tuple addArrayOfLocalDateTime(LocalDateTime[] value)
      Add an array of value at the end of the tuple.
      Parameters:
      value - the value
      Returns:
      a reference to this, so the API can be used fluently
    • addArrayOfOffsetTime

      public Tuple addArrayOfOffsetTime(OffsetTime[] value)
      Add an array of value at the end of the tuple.
      Parameters:
      value - the value
      Returns:
      a reference to this, so the API can be used fluently
    • addArrayOfOffsetDateTime

      public Tuple addArrayOfOffsetDateTime(OffsetDateTime[] value)
      Add an array of value at the end of the tuple.
      Parameters:
      value - the value
      Returns:
      a reference to this, so the API can be used fluently
    • addArrayOfUUID

      public Tuple addArrayOfUUID(UUID[] value)
      Add an array of value at the end of the tuple.
      Parameters:
      value - the value
      Returns:
      a reference to this, so the API can be used fluently
    • addArrayOfBigDecimal

      public Tuple addArrayOfBigDecimal(BigDecimal[] value)
      Add an array of value at the end of the tuple.
      Parameters:
      value - the value
      Returns:
      a reference to this, so the API can be used fluently
    • newInstance

      public static Tuple newInstance(Tuple arg)