T
- The second object type.public class LongObjTuple2<T> extends Object implements Iterable<Object>, Serializable, Comparable<LongObjTuple2<T>>
of(long, Object)
,
Tuple2
,
Serialized FormModifier and Type | Method and Description |
---|---|
int |
compareTo(LongObjTuple2<T> o) |
static <T> Tuple2<Long,T> |
convert(LongObjTuple2<T> tuple)
Converts a
LongObjTuple2 to a Tuple2 . |
boolean |
equals(Object o) |
static <T> LongObjTuple2<T> |
from(Tuple2<Long,T> tuple2)
Converts a
Tuple2 to a LongObjTuple2 . |
Object |
get(int index)
Get the object at the given index.
|
long |
getT1()
Type-safe way to get the fist object of this
Tuples . |
T |
getT2()
Type-safe way to get the second object of this
Tuples . |
int |
hashCode() |
Iterator<Object> |
iterator() |
static <T> LongObjTuple2<T> |
of(long t1,
T t2)
Create a
LongObjTuple2 with the given objects. |
int |
size()
Return the number of elements in this Tuples.
|
Object[] |
toArray()
Turn this Tuples into a plain Object array.
|
List<Object> |
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 <T> LongObjTuple2<T> of(long t1, T t2)
LongObjTuple2
with the given objects.T
- The type of the second value.t1
- The first value in the tuple. Not null.t2
- The second value in the tuple. Not null.LongObjTuple2
.public static <T> LongObjTuple2<T> from(Tuple2<Long,T> tuple2)
Tuple2
to a LongObjTuple2
.T
- The type of the second value.tuple2
- The Tuple2
to convert.LongObjTuple2
.public static <T> Tuple2<Long,T> convert(LongObjTuple2<T> tuple)
LongObjTuple2
to a Tuple2
.T
- The type of the second value.tuple
- The LongObjTuple2
to convert.Tuple2
.public long getT1()
Tuples
.public T getT2()
Tuples
.@Nullable public Object get(int index)
index
- The index of the object to retrieve. Starts at 0.public List<Object> toList()
public Object[] toArray()
public int size()
public final String toString()
public int compareTo(LongObjTuple2<T> o)
compareTo
in interface Comparable<LongObjTuple2<T>>