public class Tuple extends CloneSupport<Tuple> implements Iterable<Object>, Serializable
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object obj) |
<T> T |
get(int index)
获取指定位置元素
|
Object[] |
getMembers()
获得所有元素
|
int |
hashCode() |
Iterator<Object> |
iterator() |
Tuple |
setCacheHash(boolean cacheHash)
缓存Hash值,当为true时,此对象的hash值只被计算一次,常用于Tuple中的值不变时使用。
注意:当为true时,member变更对象后,hash值不会变更。
|
String |
toString() |
clone
finalize, getClass, notify, notifyAll, wait, wait, wait
forEach, spliterator
public Tuple(Object... members)
members
- 成员数组public <T> T get(int index)
T
- 返回对象类型index
- 位置public Object[] getMembers()
public Tuple setCacheHash(boolean cacheHash)
cacheHash
- 是否缓存hash值Copyright © 2021. All rights reserved.