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(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) |
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, spliteratorprotected Tuple(Object... values)
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 © 2020 Flipkart. All rights reserved.