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>
- Direct Known Subclasses:
T2
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:
-
Nested Class Summary
-
Constructor Summary
ConstructorsConstructorDescriptionEmpty constructor required byExternalizable.IgniteBiTuple(V1 val1, V2 val2) Fully initializes this tuple. -
Method Summary
Modifier and TypeMethodDescriptionvoidclear()clone()booleancontainsKey(Object key) booleancontainsValue(Object val) entrySet()booleanget1()Gets first value.get2()Gets second value.getKey()getValue()inthashCode()booleanisEmpty()iterator()keySet()voidvoidvoidSets both values in the tuple.voidSets first value.voidSets second value.intsize()swap()Swaps values.toString()values()voidMethods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface java.lang.Iterable
forEach, spliteratorMethods inherited from interface java.util.Map
compute, computeIfAbsent, computeIfPresent, forEach, getOrDefault, merge, putIfAbsent, remove, replace, replace, replaceAll
-
Constructor Details
-
IgniteBiTuple
public IgniteBiTuple()Empty constructor required byExternalizable. -
IgniteBiTuple
Fully initializes this tuple.- Parameters:
val1- First value.val2- Second value.
-
-
Method Details
-
swap
Swaps values.- Returns:
- New tuple with swapped values.
-
get1
Gets first value.- Returns:
- First value.
-
get2
Gets second value.- Returns:
- Second value.
-
set1
Sets first value.- Parameters:
val1- First value.
-
set2
Sets second value.- Parameters:
val2- Second value.
-
set
Sets both values in the tuple.- Parameters:
val1- First value.val2- Second value.
-
getKey
-
getValue
-
setValue
-
iterator
-
size
public int size() -
isEmpty
public boolean isEmpty() -
containsKey
- Specified by:
containsKeyin interfaceMap<V1,V2>
-
containsValue
- Specified by:
containsValuein interfaceMap<V1,V2>
-
get
-
put
-
remove
-
putAll
-
clear
public void clear() -
keySet
-
values
-
entrySet
-
clone
-
writeExternal
- Specified by:
writeExternalin interfaceExternalizable- Throws:
IOException
-
readExternal
- Specified by:
readExternalin interfaceExternalizable- Throws:
IOExceptionClassNotFoundException
-
hashCode
public int hashCode() -
equals
-
toString
-