Class GridTuple<V>
- java.lang.Object
-
- org.apache.ignite.internal.util.lang.GridTuple<V>
-
- All Implemented Interfaces:
Externalizable,Serializable,Cloneable,Iterable<V>
- Direct Known Subclasses:
T1
public class GridTuple<V> extends Object implements Iterable<V>, Cloneable, Externalizable
Convenience class representing mutable tuple of a single value.Thread Safety
This class doesn't provide any synchronization for multi-threaded access and it is responsibility of the user of this class to provide outside synchronization, if needed.- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description GridTuple()Empty constructor required byExternalizable.GridTuple(V val)Constructs mutable object with given value.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Objectclone()booleanequals(Object obj)Vget()Gets value.inthashCode()Iterator<V>iterator()voidreadExternal(ObjectInput in)voidset(V val)Sets value.StringtoString()voidwriteExternal(ObjectOutput out)-
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface java.lang.Iterable
forEach, spliterator
-
-
-
-
Constructor Detail
-
GridTuple
public GridTuple()
Empty constructor required byExternalizable.
-
GridTuple
public GridTuple(@Nullable V val)Constructs mutable object with given value.- Parameters:
val- Wrapped value.
-
-
Method Detail
-
get
@Nullable public V get()
Gets value.- Returns:
- Wrapped value.
-
set
public void set(@Nullable V val)Sets value.- Parameters:
val- Value to set.
-
writeExternal
public void writeExternal(ObjectOutput out) throws IOException
- Specified by:
writeExternalin interfaceExternalizable- Throws:
IOException
-
readExternal
public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException
- Specified by:
readExternalin interfaceExternalizable- Throws:
IOExceptionClassNotFoundException
-
-