Class std.rt.Tuple
Synopsis
public class Tuple< A, B >
A pairing of objects.
The pairing is ordered (there is a first element and a second element), and they may be of different types. Two tuples compare equal if both of their elements are equal, and the hash for a tuple is a function of the hashes of its elements.
Due to this property, it is possible to define "recursive tuples" which contain more than
two elements, by making the second element a tuple itself. For example, Tuple< A, Tuple<B, C> >
,
is a tuple (A, B, C). While the first element could be a tuple instead, it is a convention
to recursively make the second element a tuple.
Fields
Constructors
Construct a tuple with both elements null
.
Construct a tuple with the specified two elements.
Methods
No description given
No description given
Return the left element.
Returns
The left element.
Return the right element.
Returns
The right element.