cz.cuni.amis.utils.flag
Interface IFlag<T>
- All Superinterfaces:
- java.io.Serializable
- All Known Subinterfaces:
- IReasonFlag<TYPE,REASON>
- All Known Implementing Classes:
- And, Connective, Flag, FlagInteger, FlagJMXProxy, ImmutableFlag, ImmutableReasonFlag, Or, ReasonFlag
public interface IFlag<T>
- extends java.io.Serializable
Interface for flags. Flags is a reference that raises events each time the
referenced object is changed.
Note that flag implementation must be Serializable
!
addListener
void addListener(FlagListener<T> listener)
addStrongListener
void addStrongListener(FlagListener<T> listener)
clearListeners
void clearListeners()
getFlag
T getFlag()
isListenning
boolean isListenning(FlagListener<T> listener)
removeListener
void removeListener(FlagListener<T> listener)
removeAllListeners
void removeAllListeners()
setFlag
void setFlag(T newValue)
getImmutable
ImmutableFlag<T> getImmutable()
inSync
void inSync(Flag.DoInSync<T> command)
isFrozen
boolean isFrozen()
freeze
void freeze()
defreeze
void defreeze()