public final class Tuple2<A,B> extends Tuple
| 限定符和类型 | 方法和说明 |
|---|---|
Tuple2<A,B> |
copy()
Returns a copy of this instance.
|
boolean |
eq(Object a,
Object b) |
boolean |
equals(Object obj)
Override the Object equals method as abstract.
|
<T> T |
get(int index)
Get the object at the given index.
|
int |
hashCode()
Override the Object hashCode method as abstract.
|
int |
length()
Returns int value of this tuple elements count.
|
static <A,B> Tuple2<A,B> |
of(A a,
B b) |
<T> void |
set(T value,
int index)
Set the value at the given index.
|
Tuple2<B,A> |
swap()
Returns a Tuple2 Object of this instance swapped values.
|
Object[] |
toArray()
Turn this
Tuple into a plain Object[]. |
String |
toString()
Override the Object toString method as abstract.
|
public static <A,B> Tuple2<A,B> of(A a, B b)
public <T> T get(int index)
Tuplepublic <T> void set(T value,
int index)
Tuplepublic Object[] toArray()
TupleTuple into a plain Object[].
The array isn't tied to this Tuple but is a copy.public boolean equals(Object obj)
Tuplepublic int hashCode()
Tuplepublic int length()
TupleCopyright © 2023. All rights reserved.