T0
- The type of field 0T1
- The type of field 1T2
- The type of field 2T3
- The type of field 3T4
- The type of field 4T5
- The type of field 5@Public public class Tuple6<T0,T1,T2,T3,T4,T5> extends Tuple
getField(int)
method. The tuple field positions start at zero.
Tuples are mutable types, meaning that their fields can be re-assigned. This allows functions that work with Tuples to reuse objects in order to reduce pressure on the garbage collector.
Warning: If you subclass Tuple6, then be sure to either
Tuple
,
Serialized FormModifier and Type | Field and Description |
---|---|
T0 |
f0
Field 0 of the tuple.
|
T1 |
f1
Field 1 of the tuple.
|
T2 |
f2
Field 2 of the tuple.
|
T3 |
f3
Field 3 of the tuple.
|
T4 |
f4
Field 4 of the tuple.
|
T5 |
f5
Field 5 of the tuple.
|
Constructor and Description |
---|
Tuple6()
Creates a new tuple where all fields are null.
|
Tuple6(T0 f0,
T1 f1,
T2 f2,
T3 f3,
T4 f4,
T5 f5)
Creates a new tuple and assigns the given values to the tuple's fields.
|
Modifier and Type | Method and Description |
---|---|
Tuple6<T0,T1,T2,T3,T4,T5> |
copy()
Shallow tuple copy.
|
boolean |
equals(Object o)
Deep equality for tuples by calling equals() on the tuple members.
|
int |
getArity()
Gets the number of field in the tuple (the tuple arity).
|
<T> T |
getField(int pos)
Gets the field at the specified position.
|
int |
hashCode() |
static <T0,T1,T2,T3,T4,T5> |
of(T0 f0,
T1 f1,
T2 f2,
T3 f3,
T4 f4,
T5 f5)
Creates a new tuple and assigns the given values to the tuple's fields.
|
<T> void |
setField(T value,
int pos)
Sets the field at the specified position.
|
void |
setFields(T0 f0,
T1 f1,
T2 f2,
T3 f3,
T4 f4,
T5 f5)
Sets new values to all fields of the tuple.
|
String |
toString()
Creates a string representation of the tuple in the form (f0, f1, f2, f3, f4, f5), where the
individual fields are the value returned by calling
Object.toString() on that field. |
getFieldNotNull, getTupleClass, newInstance
public T0 f0
public T1 f1
public T2 f2
public T3 f3
public T4 f4
public T5 f5
public Tuple6()
public Tuple6(T0 f0, T1 f1, T2 f2, T3 f3, T4 f4, T5 f5)
f0
- The value for field 0f1
- The value for field 1f2
- The value for field 2f3
- The value for field 3f4
- The value for field 4f5
- The value for field 5public int getArity()
Tuple
public <T> T getField(int pos)
Tuple
public <T> void setField(T value, int pos)
Tuple
public void setFields(T0 f0, T1 f1, T2 f2, T3 f3, T4 f4, T5 f5)
f0
- The value for field 0f1
- The value for field 1f2
- The value for field 2f3
- The value for field 3f4
- The value for field 4f5
- The value for field 5public String toString()
Object.toString()
on that field.public boolean equals(Object o)
public static <T0,T1,T2,T3,T4,T5> Tuple6<T0,T1,T2,T3,T4,T5> of(T0 f0, T1 f1, T2 f2, T3 f3, T4 f4, T5 f5)
Tuple3.of(n, x, s)
instead of new
Tuple3<Integer, Double, String>(n, x, s)
Copyright © 2014–2021 The Apache Software Foundation. All rights reserved.