com.ibm.dse.base.types
Class DSEElementState

java.lang.Object
  |
  +--com.ibm.dse.base.types.DSEElementState

public class DSEElementState
extends java.lang.Object
implements ElementState, java.io.Externalizable

This class implements the ElementState interface, as a 32 bits mask of state flags, using only the first five bits as the flags named mandatory, hidden, readOnly, disabled and omitted.

See Also:
Serialized Form

Field Summary
protected  int disabled
           
protected  int hidden
           
protected  int mandatory
           
protected  int mask
           
protected  int omitted
           
protected  int ones
           
protected  int readOnly
           
 
Constructor Summary
DSEElementState()
          This constructor creates a DSEElementState object with all flags not activated.
DSEElementState(int aMask)
          This constructor creates a new DSEElementState with a given mask.
 
Method Summary
 java.lang.Object clone()
          Clones the DSEElementState
 boolean get(java.lang.String flagName)
          Gets the flag state whose name is flagName
 boolean isDisabled()
          Returns true if the disabled flag is activated and false otherwise.
 boolean isHidden()
          Returns true if the hidden flag is activated and false otherwise.
 boolean isMandatory()
          Returns true if the mandatory flag is activated and false otherwise.
 boolean isOmitted()
          Returns true if the omitted flag is activated and false otherwise.
 boolean isReadOnly()
          Returns true if the readOnly flag is activated and false otherwise.
 void readExternal(java.io.ObjectInput s)
          Invokes the object creation from an ObjectInput.
 void set(java.lang.String flagName, boolean aValue)
          Sets a flag state to aValue
 void setDisabled(boolean aValue)
          Sets the disabled flag to aValue.
 void setHidden(boolean aValue)
          Sets the hidden flag to aValue.
 void setMandatory(boolean aValue)
          Sets the mandatory flag to aValue.
 void setOmitted(boolean aValue)
          Sets the omitted flag to aValue.
 void setReadOnly(boolean aValue)
          Sets the readOnly flag to aValue.
 void writeExternal(java.io.ObjectOutput s)
          Provides concrete serialization handling for DSEElementState.
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

mask

protected int mask

mandatory

protected int mandatory

hidden

protected int hidden

readOnly

protected int readOnly

disabled

protected int disabled

omitted

protected int omitted

ones

protected int ones
Constructor Detail

DSEElementState

public DSEElementState()
This constructor creates a DSEElementState object with all flags not activated.

DSEElementState

public DSEElementState(int aMask)
This constructor creates a new DSEElementState with a given mask.
Parameters:
aMask - int
Method Detail

clone

public java.lang.Object clone()
Clones the DSEElementState
Specified by:
clone in interface ElementState
Overrides:
clone in class java.lang.Object
Returns:
Object

get

public boolean get(java.lang.String flagName)
            throws DSEInvalidArgumentException
Gets the flag state whose name is flagName
Specified by:
get in interface ElementState
Parameters:
flagName - java.lang.String
Returns:
boolean
Throws:
DSEInvalidArgumentException - flagName is invalid.

isDisabled

public boolean isDisabled()
Returns true if the disabled flag is activated and false otherwise.
Specified by:
isDisabled in interface ElementState
Returns:
boolean

isHidden

public boolean isHidden()
Returns true if the hidden flag is activated and false otherwise.
Specified by:
isHidden in interface ElementState
Returns:
boolean

isMandatory

public boolean isMandatory()
Returns true if the mandatory flag is activated and false otherwise.
Specified by:
isMandatory in interface ElementState
Returns:
boolean

isOmitted

public boolean isOmitted()
Returns true if the omitted flag is activated and false otherwise.
Specified by:
isOmitted in interface ElementState
Returns:
boolean

isReadOnly

public boolean isReadOnly()
Returns true if the readOnly flag is activated and false otherwise.
Specified by:
isReadOnly in interface ElementState
Returns:
boolean

readExternal

public void readExternal(java.io.ObjectInput s)
                  throws java.io.IOException,
                         java.lang.ClassNotFoundException
Invokes the object creation from an ObjectInput.
Specified by:
readExternal in interface java.io.Externalizable
Parameters:
s - java.io.ObjectInput
Throws:
java.io.IOException. -  
java.lang.ClassNotFoundException. -  

set

public void set(java.lang.String flagName,
                boolean aValue)
         throws DSEInvalidArgumentException
Sets a flag state to aValue
Specified by:
set in interface ElementState
Parameters:
flagName - java.lang.String
aValue - boolean
Throws:
DSEInvalidArgumentException - flagName is invalid.

setDisabled

public void setDisabled(boolean aValue)
Sets the disabled flag to aValue.
Specified by:
setDisabled in interface ElementState
Parameters:
aValue - boolean

setHidden

public void setHidden(boolean aValue)
Sets the hidden flag to aValue.
Specified by:
setHidden in interface ElementState
Parameters:
aValue - boolean

setMandatory

public void setMandatory(boolean aValue)
Sets the mandatory flag to aValue.
Specified by:
setMandatory in interface ElementState
Parameters:
aValue - boolean

setOmitted

public void setOmitted(boolean aValue)
Sets the omitted flag to aValue.
Specified by:
setOmitted in interface ElementState
Parameters:
aValue - boolean

setReadOnly

public void setReadOnly(boolean aValue)
Sets the readOnly flag to aValue.
Specified by:
setReadOnly in interface ElementState
Parameters:
aValue - boolean

writeExternal

public void writeExternal(java.io.ObjectOutput s)
                   throws java.io.IOException
Provides concrete serialization handling for DSEElementState.
Specified by:
writeExternal in interface java.io.Externalizable
Parameters:
s - java.io.ObjectOutput
Throws:
java.io.IOException. -