Usage example:
{@code List@author tiweresult = query.from(employee).list(new QTuple(employee.firstName, employee.lastName));}for (Tuple row : result) System.out.println("firstName " + row.get(employee.firstName)); System.out.println("lastName " + row.get(employee.lastName)); } }
The fields in the tuples may be accessed directly a public fields, or via position (zero indexed) {@link #getField(int)}.
Tuples are in principle serializable. However, they may contain non-serializable fields, in which case serialization will fail.
Tuple
class, a subclass of AbstractScoreSlot
, is a score slot type that is meant to contain the score from the "Ones", "Twos", "Threes", "Fours", "Fives" or "Sixes" combination of the Yahtzee dice game. The mode of the slot is decided by the variable slotMode
.
@author Priidu Neemre
A tuple essentially behaves like an immutable array. In Golo, tuples can be created as follows:
# Short syntax let t1 = [1, 2, 3] # Complete collection literal syntax let t2 = tuple[1, 2, 3]
The fields in the tuples may be accessed directly a public fields, or via position (zero indexed) {@link #getField(int)}.
Tuples are in principle serializable. However, they may contain non-serializable fields, in which case serialization will fail.
Tuples are constructed only by a {@link TupleFactory}. A {@link DefaultTupleFactory}is provided by the system. If users wish to use their own type of Tuple, they should also provide an implementation of {@link TupleFactory} toconstruct their types of Tuples.
Tuple
s. Each Tuple
Is able to return the FactHandleImpl
members of the partial match for the requested pattern. The pattern refers to the index position of the FactHandleImpl
in the underlying implementation.
@see FactHandle;
Declaration
s to current fact values.
@see Declaration
@author bob mcwhirter
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|