cz.cuni.amis.utils
Class SyncLazy<T>
java.lang.Object
cz.cuni.amis.utils.Lazy<T>
cz.cuni.amis.utils.SyncLazy<T>
- Type Parameters:
T
-
public abstract class SyncLazy<T>
- extends Lazy<T>
Lazy
that has synchronized Lazy.create()
method (you do not need to synchronize it for yourself).
THREAD-SAFE!
- Author:
- Jimmy
Fields inherited from class cz.cuni.amis.utils.Lazy |
obj |
Methods inherited from class cz.cuni.amis.utils.Lazy |
create |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
SyncLazy
public SyncLazy()
getVal
public T getVal()
- Deprecated.
- Overrides:
getVal
in class Lazy<T>
- Returns:
- value created by
Lazy.create()
(SYNCHRONIZED CREATION!)
get
public T get()
- Description copied from class:
Lazy
- Synonym for
Lazy.getVal()
.
- Overrides:
get
in class Lazy<T>
- Returns:
- value created by
Lazy.create()
(SYNCHRONIZED CREATION!)
set
public void set(T val)
- Description copied from class:
Lazy
- Sets value that should be returned via
Lazy.get()
.
- Overrides:
set
in class Lazy<T>
Copyright © 2015 AMIS research group, Faculty of Mathematics and Physics, Charles University in Prague, Czech Republic. All Rights Reserved.