public class Tuple
extends java.lang.Object
implements java.lang.Iterable, java.io.Serializable
Collection of objects,
each of which can be of an arbitrary type.| Modifier and Type | Field and Description |
|---|---|
protected java.lang.Object[] |
entries |
protected int |
size |
| Constructor and Description |
|---|
Tuple(java.util.Collection<java.lang.Object> values)
Creates a new
Tuple that holds the given values. |
Tuple(java.lang.Object... values)
Creates a new
Tuple that holds the given values. |
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(java.lang.Object o) |
java.lang.Object |
get(int index)
Get the object at the given index.
|
int |
hashCode() |
java.util.Iterator<?> |
iterator() |
int |
size()
Return the number of elements in this Tuple.
|
java.lang.Object[] |
toArray()
Turn this Tuple into a plain Object array.
|
public Tuple(java.util.Collection<java.lang.Object> values)
Tuple that holds the given values.values - The values to holdpublic Tuple(java.lang.Object... values)
Tuple that holds the given values.values - The values to holdpublic java.lang.Object get(int index)
index - The index of the object to retrieve. Starts at 0.public java.lang.Object[] toArray()
public int size()
public java.util.Iterator<?> iterator()
iterator in interface java.lang.Iterablepublic int hashCode()
hashCode in class java.lang.Objectpublic boolean equals(java.lang.Object o)
equals in class java.lang.Object