public class Tuple
extends java.lang.Object
implements java.lang.Iterable<java.lang.Object>, java.io.Serializable
Collection
of objects,
each of which can be of an arbitrary type.Modifier and Type | Field and Description |
---|---|
protected static Tuple |
empty |
protected int |
size |
Modifier | Constructor and Description |
---|---|
protected |
Tuple(int size)
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) |
int |
hashCode() |
java.util.Iterator<java.lang.Object> |
iterator() |
int |
size()
Return the number of elements in this Tuple.
|
java.lang.Object[] |
toArray()
Turn this Tuple into a plain Object array.
|
java.util.List<java.lang.Object> |
toList()
Turn this Tuple into a plain Object list.
|
protected static final Tuple empty
protected final int size
protected Tuple(int size)
Tuple
that holds the given values
.size
- The number of values to holdpublic java.lang.Object get(int index)
public java.lang.Object[] toArray()
public java.util.List<java.lang.Object> toList()
public int size()
public java.util.Iterator<java.lang.Object> iterator()
iterator
in interface java.lang.Iterable<java.lang.Object>
public boolean equals(java.lang.Object o)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object