cz.cuni.amis.utils.flag
Class ImmutableReasonFlag<T,R>

Package class diagram package ImmutableReasonFlag
java.lang.Object
  extended by cz.cuni.amis.utils.flag.Flag<T>
      extended by cz.cuni.amis.utils.flag.ImmutableFlag<T>
          extended by cz.cuni.amis.utils.flag.ImmutableReasonFlag<T,R>
All Implemented Interfaces:
IFlag<T>, IReasonFlag<T,R>, Serializable

public class ImmutableReasonFlag<T,R>
extends ImmutableFlag<T>
implements IReasonFlag<T,R>, Serializable

Reason flag whose value cannot be set.

Author:
ik
See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from class cz.cuni.amis.utils.flag.Flag
Flag.DoInSync<T>
 
Field Summary
 
Fields inherited from class cz.cuni.amis.utils.flag.ImmutableFlag
flag
 
Constructor Summary
ImmutableReasonFlag(IReasonFlag<T,R> flag)
           
 
Method Summary
 void setFlag(T newValue, R reasonForChange)
          Changes the flag and informs all listeners.
 
Methods inherited from class cz.cuni.amis.utils.flag.ImmutableFlag
addListener, addStrongListener, clearListeners, defreeze, freeze, getFlag, getImmutable, inSync, isFrozen, isListenning, removeListener, setFlag
 
Methods inherited from class cz.cuni.amis.utils.flag.Flag
inSyncInner, isNone, isOne, removeAllListeners, waitFor, waitFor, waitForChange, waitForChange
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface cz.cuni.amis.utils.flag.IFlag
addListener, addStrongListener, clearListeners, defreeze, freeze, getFlag, getImmutable, inSync, isFrozen, isListenning, removeAllListeners, removeListener, setFlag
 

Constructor Detail

ImmutableReasonFlag

public ImmutableReasonFlag(IReasonFlag<T,R> flag)
Method Detail

setFlag

public void setFlag(T newValue,
                    R reasonForChange)
Description copied from interface: IReasonFlag
Changes the flag and informs all listeners.

Should not produce any dead-locks even though it is synchronized method.

Specified by:
setFlag in interface IReasonFlag<T,R>


Copyright © 2014 AMIS research group, Faculty of Mathematics and Physics, Charles University in Prague, Czech Republic. All Rights Reserved.