com.sdm.quasar.client.core.states
Class NOTBooleanState

java.lang.Object
  extended bycom.sdm.quasar.client.core.states.AbstractState
      extended bycom.sdm.quasar.client.core.states.NOTBooleanState
All Implemented Interfaces:
BooleanState, Disposable, State

public class NOTBooleanState
extends AbstractState
implements BooleanState

A BooleanState, that negates it's source state.

Version:
1.$Revision$
Author:
Thomas Wolf

Constructor Summary
NOTBooleanState(BooleanState state)
          Creates a new NOTBooleanState.
NOTBooleanState(java.lang.String name, BooleanState state)
          Creates a new NOTBooleanState.
 
Method Summary
static NOTBooleanState create(BooleanState state)
          Creates a new NOTBooleanState.
static NOTBooleanState create(java.lang.String name, BooleanState state)
          Creates a new NOTBooleanState.
 void dispose()
          Disposes the component.
 BooleanState getState()
          Returns the source BooleanState.
 java.lang.Object getValue()
           
 boolean isValueTrue()
          Returns true, if this State is enabled, false otherwise.
 
Methods inherited from class com.sdm.quasar.client.core.states.AbstractState
addStateListener, appendParametersToString, fireStateChanged, getName, removeStateListener, setName, stateValueToString, toString, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface com.sdm.quasar.client.core.states.State
addStateListener, getName, removeStateListener, setName
 

Constructor Detail

NOTBooleanState

public NOTBooleanState(BooleanState state)
Creates a new NOTBooleanState.


NOTBooleanState

public NOTBooleanState(java.lang.String name,
                       BooleanState state)
Creates a new NOTBooleanState.

Parameters:
name -
Method Detail

dispose

public void dispose()
             throws DisposeException
Description copied from interface: Disposable
Disposes the component.

Important:
This method is called by an administrating component and must never be called directly.

The implementation should release any resources or objects allocated and any services registered. Furthermore, this method should be developed carefully to free a maximum of resources even when the system may have become unstable. In case of one or multiple errors, you should collect them in a DisposeException, continue with the execution, and throw it at the end of the method.

Note: The implementation must not return before the component is disposed. Any threads or asynchronous calls started must be completed before this method returns.

Specified by:
dispose in interface Disposable
Overrides:
dispose in class AbstractState
Throws:
DisposeException
See Also:
AbstractState.dispose()

getState

public BooleanState getState()
Returns the source BooleanState.


getValue

public java.lang.Object getValue()
Specified by:
getValue in interface State
Returns:
the current state value.
See Also:
State.getValue()

isValueTrue

public boolean isValueTrue()
Description copied from interface: BooleanState
Returns true, if this State is enabled, false otherwise.

Specified by:
isValueTrue in interface BooleanState
Returns:
true, if this State is enabled, false otherwise.
See Also:
BooleanState.isValueTrue()

create

public static NOTBooleanState create(BooleanState state)
Creates a new NOTBooleanState.

Parameters:
state - the BooleanState to negate
Returns:
the created NOTBooleanState

create

public static NOTBooleanState create(java.lang.String name,
                                     BooleanState state)
Creates a new NOTBooleanState.

Parameters:
name - the name of this NOTBooleanState (not null)
state - the BooleanState to negate
Returns:
the created NOTBooleanState