java.lang.Object
org.seasar.doma.jdbc.criteria.tuple.Tuple2<T1,T2>
- Type Parameters:
T1- the type of the first elementT2- the type of the second element
A tuple class that holds two elements of potentially different types.
This class is used in the criteria API to represent pairs of values returned from database queries, allowing for type-safe access to multiple columns in query results.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionReturns the first element of this tuple.Returns the second element of this tuple.booleanCompares this tuple with the specified object for equality.getItem1()Returns the first element of this tuple.getItem2()Returns the second element of this tuple.inthashCode()Returns the hash code value for this tuple.toString()Returns a string representation of this tuple.
-
Constructor Details
-
Tuple2
Constructs a new tuple with the specified elements.- Parameters:
item1- the first elementitem2- the second element
-
-
Method Details
-
getItem1
Returns the first element of this tuple.- Returns:
- the first element
-
getItem2
Returns the second element of this tuple.- Returns:
- the second element
-
component1
Returns the first element of this tuple.This method provides Kotlin-style component access.
- Returns:
- the first element
-
component2
Returns the second element of this tuple.This method provides Kotlin-style component access.
- Returns:
- the second element
-
equals
Compares this tuple with the specified object for equality. -
hashCode
public int hashCode()Returns the hash code value for this tuple. -
toString
Returns a string representation of this tuple.
-