Package elki.parallel.variables
Class SharedObject.Instance<T>
- java.lang.Object
-
- elki.parallel.variables.SharedObject.Instance<T>
-
- Type Parameters:
T
- Data type
- All Implemented Interfaces:
SharedVariable.Instance<T>
- Enclosing class:
- SharedObject<T>
public static class SharedObject.Instance<T> extends java.lang.Object implements SharedVariable.Instance<T>
Instance for a particular thread.- Author:
- Erich Schubert
-
-
Constructor Summary
Constructors Constructor Description Instance()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description T
get()
Get the current valuevoid
set(T data)
Set a new value
-
-
-
Field Detail
-
data
private T data
Cache for last data consumed/produced
-
-
Method Detail
-
get
public T get()
Description copied from interface:SharedVariable.Instance
Get the current value- Specified by:
get
in interfaceSharedVariable.Instance<T>
- Returns:
- Value
-
set
public void set(T data)
Description copied from interface:SharedVariable.Instance
Set a new value- Specified by:
set
in interfaceSharedVariable.Instance<T>
- Parameters:
data
- Setter
-
-