public abstract class Tuple extends Object implements Iterable<Object>, Serializable, Comparable<Tuple>
Abstract base class for all tuple classes.
| Modifier | Constructor and Description |
|---|---|
protected |
Tuple(int size,
Object... values)
Deprecated.
Will be removed in 1.4. The "size" parameter is of no use at
this level, so use the simpler Tuple(values) constructor instead.
|
protected |
Tuple(Object... values) |
| Modifier and Type | Method and Description |
|---|---|
int |
compareTo(Tuple o) |
boolean |
contains(Object value) |
boolean |
containsAll(Collection<?> collection) |
boolean |
containsAll(Object... values) |
boolean |
equals(Object obj) |
abstract int |
getSize()
Return the size of the tuple.
|
Object |
getValue(int pos)
Get the value at a specific position in the tuple.
|
int |
hashCode() |
int |
indexOf(Object value) |
Iterator<Object> |
iterator() |
int |
lastIndexOf(Object value) |
Object[] |
toArray() |
List<Object> |
toList() |
String |
toString() |
clone, finalize, getClass, notify, notifyAll, wait, wait, waitforEach, spliterator@Deprecated protected Tuple(int size, Object... values)
protected Tuple(Object... values)
public abstract int getSize()
Return the size of the tuple.
public final Object getValue(int pos)
Get the value at a specific position in the tuple. This method has to return object, so using it you will lose the type-safety you get with the getValueX() methods.
pos - the position of the value to be retrieved.public final boolean contains(Object value)
public final boolean containsAll(Collection<?> collection)
public final boolean containsAll(Object... values)
public final int indexOf(Object value)
public final int lastIndexOf(Object value)
public final Object[] toArray()
public int compareTo(Tuple o)
compareTo in interface Comparable<Tuple>Copyright © 2017. All rights reserved.