public class LongLongTuple2 extends Object implements Iterable<Long>, Serializable, Comparable<LongLongTuple2>
of(long, long)
,
Tuple2
,
Serialized FormModifier and Type | Method and Description |
---|---|
int |
compareTo(LongLongTuple2 o) |
static Tuple2<Long,Long> |
convert(LongLongTuple2 tuple)
Converts a
LongLongTuple2 to a Tuple2 . |
boolean |
equals(Object o) |
static LongLongTuple2 |
from(Tuple2<Long,Long> tuple2)
Converts a
Tuple2 to a LongLongTuple2 . |
long |
get(int index)
Get the object at the given index.
|
long |
getT1()
Type-safe way to get the fist object of this
Tuples . |
long |
getT2()
Type-safe way to get the second object of this
Tuples . |
int |
hashCode() |
Iterator<Long> |
iterator() |
static LongLongTuple2 |
of(long t1,
long t2)
Create a
LongLongTuple2 with the given objects. |
int |
size()
Return the number of elements in this Tuples.
|
long[] |
toArray()
Turn this Tuples into a plain Object array.
|
List<Long> |
toList()
Turn this Tuples into a plain Object list.
|
String |
toString()
A Tuple String representation is the comma separated list of values, enclosed
in square brackets.
|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
forEach, spliterator
public static LongLongTuple2 of(long t1, long t2)
LongLongTuple2
with the given objects.t1
- The first value in the tuple. Not null.t2
- The second value in the tuple. Not null.LongLongTuple2
.public static LongLongTuple2 from(Tuple2<Long,Long> tuple2)
Tuple2
to a LongLongTuple2
.tuple2
- The Tuple2
to convert.LongLongTuple2
.public static Tuple2<Long,Long> convert(LongLongTuple2 tuple)
LongLongTuple2
to a Tuple2
.tuple
- The LongLongTuple2
to convert.Tuple2
.public long getT1()
Tuples
.public long getT2()
Tuples
.public long get(int index)
index
- The index of the object to retrieve. Starts at 0.IndexOutOfBoundsException
if out of bounds.IndexOutOfBoundsException
- if the index is out of range.public List<Long> toList()
public long[] toArray()
public int size()
public final String toString()
public int compareTo(LongLongTuple2 o)
compareTo
in interface Comparable<LongLongTuple2>