cz.cuni.amis.utils
Class SyncLazy<T>

Package class diagram package SyncLazy
java.lang.Object
  extended by cz.cuni.amis.utils.Lazy<T>
      extended by 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

Field Summary
 
Fields inherited from class cz.cuni.amis.utils.Lazy
obj
 
Constructor Summary
SyncLazy()
           
 
Method Summary
 T get()
          Synonym for Lazy.getVal().
 T getVal()
          Deprecated.  
 void set(T val)
          Sets value that should be returned via Lazy.get().
 
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
 

Constructor Detail

SyncLazy

public SyncLazy()
Method Detail

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 © 2012 AMIS research group, Faculty of Mathematics and Physics, Charles University in Prague, Czech Republic. All Rights Reserved.