SerializableEasyTuple2, EasyTuple3, EasyTuple4, EasyTuple5, EasyTuple6, EasyTuple7, EasyTuple8, EasyTuple9, Tuple0, Tuple1, Tuple2, Tuple3, Tuple4, Tuple5, Tuple6, Tuple7, Tuple8, Tuple9, TupleBasepublic interface Tuple extends Serializable
| 限定符和类型 | 字段 | 说明 |
|---|---|---|
static long |
serialVersionUID |
| 限定符和类型 | 方法 | 说明 |
|---|---|---|
<R> R |
__(String alias) |
Get tuple element value by alias, it will throw
AliasNotFoundException when alias not found.通过别名获取元组元素的值,如果不存在该别名,将抛出异常 AliasNotFoundException。 |
Tuple |
alias(String... aliases) |
Setting tuple's aliases.
|
int |
arity() |
The size of this Tuple.
元组的元素数量 |
boolean |
containsAlias(String alias) |
whether contains alias.
|
<R> R |
element(int n) |
The nth element of this tuple
从元组中取第n个元素 |
<R> Tuple2<String,R> |
elementWithAlias(int n) |
The nth element with alias of this tuple
从元组中取第n个元素(带别名) |
static Tuple0 |
empty() |
Create empty tuple
创建一个空元组 |
List<String> |
getAliases() |
Get list of aliases.
|
static Tuple0 |
of() |
Create empty tuple
创建一个空元组 |
static <T1> Tuple1<T1> |
of(T1 _1) |
Create a tuple of 1 element
创建1个元素的元组 |
static <T1,T2> Tuple2<T1,T2> |
of(T1 _1,
T2 _2) |
Create a tuple of 2 elements
创建2个元素的元组 |
static <T1,T2,T3> Tuple3<T1,T2,T3> |
of(T1 _1,
T2 _2,
T3 _3) |
Create a tuple of 3 elements
创建3个元素的元组 |
static <T1,T2,T3,T4> |
of(T1 _1,
T2 _2,
T3 _3,
T4 _4) |
Create a tuple of 4 elements
创建4个元素的元组 |
static <T1,T2,T3,T4,T5> |
of(T1 _1,
T2 _2,
T3 _3,
T4 _4,
T5 _5) |
Create a tuple of 5 elements
创建5个元素的元组 |
static <T1,T2,T3,T4,T5,T6> |
of(T1 _1,
T2 _2,
T3 _3,
T4 _4,
T5 _5,
T6 _6) |
Create a tuple of 6 elements
创建6个元素的元组 |
static <T1,T2,T3,T4,T5,T6,T7> |
of(T1 _1,
T2 _2,
T3 _3,
T4 _4,
T5 _5,
T6 _6,
T7 _7) |
Create a tuple of 7 elements
创建7个元素的元组 |
static <T1,T2,T3,T4,T5,T6,T7,T8> |
of(T1 _1,
T2 _2,
T3 _3,
T4 _4,
T5 _5,
T6 _6,
T7 _7,
T8 _8) |
Create a tuple of 8 elements
创建8个元素的元组 |
static <T1,T2,T3,T4,T5,T6,T7,T8,T9> |
of(T1 _1,
T2 _2,
T3 _3,
T4 _4,
T5 _5,
T6 _6,
T7 _7,
T8 _8,
T9 _9) |
Create a tuple of 9 elements
创建9个元素的元组 |
static final long serialVersionUID
int arity()
Tuple alias(String... aliases)
arity() , will throw NumberOfAliasesExceptionNumberOfAliasesExceptionaliases - aliases. 别名NumberOfAliasesException - if the number of aliases is not equal arity(). 如果设置的别名的数量不等于 arity(),抛出此异常UnsupportedOperationException - if the alias method is called by Tuple0 Tuple0.alias(java.lang.String...).<R> R __(String alias)
AliasNotFoundException when alias not found.R - return type 返回值类型alias - tuple element alias 别名AliasNotFoundException - if the `alias` not found. 如果元组不存在该别名,抛出异常boolean containsAlias(String alias)
alias - alias. 别名true if contains alias. 返回true,如果此tuple包含该别名。<R> R element(int n)
R - return type 返回值类型n - index 序号IndexOutOfBoundsException - if the `n` is out of range(n < 0 || n >= arity).
当 n < 0 或者 n >= arity() 时,抛出异常。<R> Tuple2<String,R> elementWithAlias(int n)
R - return type 返回值类型n - index 序号AliasNotSetException - if call elementWithAlias(int) before alias(java.lang.String...).
在调用 alias(java.lang.String...) 之前调用 elementWithAlias(int),将抛出AliasNotSetExceptionIndexOutOfBoundsException - if the `n` is out of range(n < 0 || n >= arity).
当 n < 0 或者 n >= arity() 时,抛出异常。static Tuple0 empty()
static Tuple0 of()
static <T1> Tuple1<T1> of(T1 _1)
T1 - type of the 1st element. 第1个元素的类型_1 - the 1st element. 第1个元素static <T1,T2> Tuple2<T1,T2> of(T1 _1, T2 _2)
T1 - type of the 1st element. 第1个元素的类型T2 - type of the 2nd element. 第2个元素的类型_1 - the 1st element. 第1个元素_2 - the 2nd element. 第2个元素static <T1,T2,T3> Tuple3<T1,T2,T3> of(T1 _1, T2 _2, T3 _3)
T1 - type of the 1st element. 第1个元素的类型T2 - type of the 2nd element. 第2个元素的类型T3 - type of the 3rd element. 第3个元素的类型_1 - the 1st element. 第1个元素_2 - the 2nd element. 第2个元素_3 - the 3rd element. 第3个元素static <T1,T2,T3,T4> Tuple4<T1,T2,T3,T4> of(T1 _1, T2 _2, T3 _3, T4 _4)
T1 - type of the 1st element. 第1个元素的类型T2 - type of the 2nd element. 第2个元素的类型T3 - type of the 3rd element. 第3个元素的类型T4 - type of the 4th element. 第4个元素的类型_1 - the 1st element. 第1个元素_2 - the 2nd element. 第2个元素_3 - the 3rd element. 第3个元素_4 - the 4th element. 第4个元素static <T1,T2,T3,T4,T5> Tuple5<T1,T2,T3,T4,T5> of(T1 _1, T2 _2, T3 _3, T4 _4, T5 _5)
T1 - type of the 1st element. 第1个元素的类型T2 - type of the 2nd element. 第2个元素的类型T3 - type of the 3rd element. 第3个元素的类型T4 - type of the 4th element. 第4个元素的类型T5 - type of the 5th element. 第5个元素的类型_1 - the 1st element. 第1个元素_2 - the 2nd element. 第2个元素_3 - the 3rd element. 第3个元素_4 - the 4th element. 第4个元素_5 - the 5th element. 第5个元素static <T1,T2,T3,T4,T5,T6> Tuple6<T1,T2,T3,T4,T5,T6> of(T1 _1, T2 _2, T3 _3, T4 _4, T5 _5, T6 _6)
T1 - type of the 1st element. 第1个元素的类型T2 - type of the 2nd element. 第2个元素的类型T3 - type of the 3rd element. 第3个元素的类型T4 - type of the 4th element. 第4个元素的类型T5 - type of the 5th element. 第5个元素的类型T6 - type of the 6th element. 第6个元素的类型_1 - the 1st element. 第1个元素_2 - the 2nd element. 第2个元素_3 - the 3rd element. 第3个元素_4 - the 4th element. 第4个元素_5 - the 5th element. 第5个元素_6 - the 6th element. 第6个元素static <T1,T2,T3,T4,T5,T6,T7> Tuple7<T1,T2,T3,T4,T5,T6,T7> of(T1 _1, T2 _2, T3 _3, T4 _4, T5 _5, T6 _6, T7 _7)
T1 - type of the 1st element. 第1个元素的类型T2 - type of the 2nd element. 第2个元素的类型T3 - type of the 3rd element. 第3个元素的类型T4 - type of the 4th element. 第4个元素的类型T5 - type of the 5th element. 第5个元素的类型T6 - type of the 6th element. 第6个元素的类型T7 - type of the 7th element. 第7个元素的类型_1 - the 1st element. 第1个元素_2 - the 2nd element. 第2个元素_3 - the 3rd element. 第3个元素_4 - the 4th element. 第4个元素_5 - the 5th element. 第5个元素_6 - the 6th element. 第6个元素_7 - the 7th element. 第7个元素static <T1,T2,T3,T4,T5,T6,T7,T8> Tuple8<T1,T2,T3,T4,T5,T6,T7,T8> of(T1 _1, T2 _2, T3 _3, T4 _4, T5 _5, T6 _6, T7 _7, T8 _8)
T1 - type of the 1st element. 第1个元素的类型T2 - type of the 2nd element. 第2个元素的类型T3 - type of the 3rd element. 第3个元素的类型T4 - type of the 4th element. 第4个元素的类型T5 - type of the 5th element. 第5个元素的类型T6 - type of the 6th element. 第6个元素的类型T7 - type of the 7th element. 第7个元素的类型T8 - type of the 8th element. 第8个元素的类型_1 - the 1st element. 第1个元素_2 - the 2nd element. 第2个元素_3 - the 3rd element. 第3个元素_4 - the 4th element. 第4个元素_5 - the 5th element. 第5个元素_6 - the 6th element. 第6个元素_7 - the 7th element. 第7个元素_8 - the 8th element. 第8个元素static <T1,T2,T3,T4,T5,T6,T7,T8,T9> Tuple9<T1,T2,T3,T4,T5,T6,T7,T8,T9> of(T1 _1, T2 _2, T3 _3, T4 _4, T5 _5, T6 _6, T7 _7, T8 _8, T9 _9)
T1 - type of the 1st element. 第1个元素的类型T2 - type of the 2nd element. 第2个元素的类型T3 - type of the 3rd element. 第3个元素的类型T4 - type of the 4th element. 第4个元素的类型T5 - type of the 5th element. 第5个元素的类型T6 - type of the 6th element. 第6个元素的类型T7 - type of the 7th element. 第7个元素的类型T8 - type of the 8th element. 第8个元素的类型T9 - type of the 9th element. 第9个元素的类型_1 - the 1st element. 第1个元素_2 - the 2nd element. 第2个元素_3 - the 3rd element. 第3个元素_4 - the 4th element. 第4个元素_5 - the 5th element. 第5个元素_6 - the 6th element. 第6个元素_7 - the 7th element. 第7个元素_8 - the 8th element. 第8个元素_9 - the 9th element. 第9个元素Copyright © 2021. All rights reserved.