Package org.apache.ignite.lang
Class IgniteBiTuple<V1,V2>
- java.lang.Object
- 
- org.apache.ignite.lang.IgniteBiTuple<V1,V2>
 
- 
- All Implemented Interfaces:
- Externalizable,- Serializable,- Cloneable,- Iterable<Object>,- Map<V1,V2>,- Map.Entry<V1,V2>
 
 public class IgniteBiTuple<V1,V2> extends Object implements Map<V1,V2>, Map.Entry<V1,V2>, Iterable<Object>, Externalizable, Cloneable Convenience class representing mutable tuple of two values.- See Also:
- Serialized Form
 
- 
- 
Constructor SummaryConstructors Constructor Description IgniteBiTuple()Empty constructor required byExternalizable.IgniteBiTuple(V1 val1, V2 val2)Fully initializes this tuple.
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclear()Objectclone()booleancontainsKey(Object key)booleancontainsValue(Object val)Set<Map.Entry<V1,V2>>entrySet()booleanequals(Object o)V2get(Object key)V1get1()Gets first value.V2get2()Gets second value.V1getKey()V2getValue()inthashCode()booleanisEmpty()Iterator<Object>iterator()Set<V1>keySet()V2put(V1 key, V2 val)voidputAll(Map<? extends V1,? extends V2> m)voidreadExternal(ObjectInput in)V2remove(Object key)voidset(V1 val1, V2 val2)Sets both values in the tuple.voidset1(V1 val1)Sets first value.voidset2(V2 val2)Sets second value.V2setValue(V2 val)intsize()IgniteBiTuple<V2,V1>swap()Swaps values.StringtoString()Collection<V2>values()voidwriteExternal(ObjectOutput out)- 
Methods inherited from class java.lang.Objectfinalize, getClass, notify, notifyAll, wait, wait, wait
 - 
Methods inherited from interface java.lang.IterableforEach, spliterator
 - 
Methods inherited from interface java.util.Mapcompute, computeIfAbsent, computeIfPresent, forEach, getOrDefault, merge, putIfAbsent, remove, replace, replace, replaceAll
 
- 
 
- 
- 
- 
Constructor Detail- 
IgniteBiTuplepublic IgniteBiTuple() Empty constructor required byExternalizable.
 
- 
 - 
Method Detail- 
swappublic IgniteBiTuple<V2,V1> swap() Swaps values.- Returns:
- New tuple with swapped values.
 
 - 
get1public V1 get1() Gets first value.- Returns:
- First value.
 
 - 
get2public V2 get2() Gets second value.- Returns:
- Second value.
 
 - 
set1public void set1(@Nullable V1 val1)Sets first value.- Parameters:
- val1- First value.
 
 - 
set2public void set2(@Nullable V2 val2)Sets second value.- Parameters:
- val2- Second value.
 
 - 
setpublic void set(@Nullable V1 val1, @Nullable V2 val2)Sets both values in the tuple.- Parameters:
- val1- First value.
- val2- Second value.
 
 - 
containsKeypublic boolean containsKey(Object key) - Specified by:
- containsKeyin interface- Map<V1,V2>
 
 - 
containsValuepublic boolean containsValue(Object val) - Specified by:
- containsValuein interface- Map<V1,V2>
 
 - 
writeExternalpublic void writeExternal(ObjectOutput out) throws IOException - Specified by:
- writeExternalin interface- Externalizable
- Throws:
- IOException
 
 - 
readExternalpublic void readExternal(ObjectInput in) throws IOException, ClassNotFoundException - Specified by:
- readExternalin interface- Externalizable
- Throws:
- IOException
- ClassNotFoundException
 
 - 
hashCodepublic int hashCode() 
 - 
equalspublic boolean equals(Object o) 
 
- 
 
-