com.sas.lang
Class BooleanData

com.sas.lang.BooleanData
All Implemented Interfaces:
com.sas.beans.PropertyChangeSource, com.sas.beans.VetoableChangeSource, ComponentInterface, com.sas.lang.BooleanDataInterface, com.sas.lang.StringDataInterface, LinkPropertiesInterface, ModelInterface, com.sas.PublicClonable, ViewInterface, MultipleValueEventSourceInterface, java.beans.PropertyChangeListener, java.io.ObjectInputValidation, java.io.Serializable, java.lang.Cloneable, java.util.EventListener

public class BooleanData
implements com.sas.PublicClonable, com.sas.lang.BooleanDataInterface, com.sas.lang.StringDataInterface

BooleanData is an implementation of BooleanDataInterface, for holding a boolean integer. The BooleanData container has a bound booleanData property, so the BooleanData object fires a PropertyChangeEvent when the object is changed with setBooleanData(Boolean).

Creating a BooleanData Component

BooleanData booleanData1 = new BooleanData(); booleanData1.initialize(); Usage

The BooleanData component stores boolean data.

 booleanData1.addPropertyChangeListener(listener);
 booleanData1.setBooleanData(l);
 ...
 l = booleanData1.getBooleanData();
 

See Also:
Serialized Form

Field Summary
static java.lang.String RB_KEY
           
 
Constructor Summary
BooleanData()
          Default Constructor
BooleanData(boolean value)
          Construct an object with an initial value.
 
Method Summary
 java.lang.Object clone()
          Creates a copy of the current model
 boolean equals(BooleanData other)
          Tests if this object equals another BooleanData object
 boolean equals(java.lang.Object object)
          Tests if this object equals another object
 boolean getBooleanData()
          Retrieves the boolean stored in the boolean model
static com.sas.beans.ExtendedBeanInfo getExtendedBeanInfo()
          Returns the ExtendedBeanInfo for this class.
 java.lang.String getText()
          Retrieves the text value of the model.
 int hashCode()
          Computes a hash code.
 void setBooleanData(boolean value)
          Sets the boolean stored in the boolean model.
 void setText(java.lang.String string)
          Assigns the value of the object from a string value.
 java.lang.String toString()
          Returns the string representation of the object.
 
Methods inherited from class com.sas.Component
addLink, addPropertyChangeListener, addVetoableChangeListener, anyPropertyChangeListeners, attachModel, attachView, beansIsDesignTime, beansSetDesignTime, clone, detachModel, detachView, dumpComponent, firePropertyChange, firePropertyChange, fireVetoableChange, getComponentDescription, getComponentSupportInfo, getEventMethod, getEventValues, getLinkInfo, getModelInterface, getRequiredInterfaces, getResources, getStringResource, getViewInterfaceSupportInfo, initialize, initializeComponent, isDesignTime, isLinked, propertyChange, queryLinks, queryLinks, refresh, removeAllLinks, removeInterfaceTraps, removeLink, removePropertyChangeListener, removeVetoableChangeListener, setComponentDescription, setComponentSupportInfo, setDefaultValues, setLinkInfo, setModelInterface, setRequiredInterfaces, setViewInterfaceSupportInfo, supportsListenerInterface, supportsRequiredInterfaces, trapInterfaceEvents, validateObject
 

Field Detail

RB_KEY

public static final java.lang.String RB_KEY
See Also:
Constant Field Values
Constructor Detail

BooleanData

public BooleanData()
Default Constructor


BooleanData

public BooleanData(boolean value)
Construct an object with an initial value.

Parameters:
value - the initial value
Method Detail

getExtendedBeanInfo

public static com.sas.beans.ExtendedBeanInfo getExtendedBeanInfo()
Returns the ExtendedBeanInfo for this class.

Returns:
ExtendedBeanInfo for this class

clone

public java.lang.Object clone()
                       throws java.lang.CloneNotSupportedException
Creates a copy of the current model

Specified by:
clone in interface com.sas.PublicClonable
Overrides:
clone in class Component
Returns:
a clone of this object
Throws:
java.lang.CloneNotSupportedException - if the object cannot be cloned

equals

public boolean equals(BooleanData other)
Tests if this object equals another BooleanData object

Returns:
true if and only if the objects have the same value.

equals

public boolean equals(java.lang.Object object)
Tests if this object equals another object

Overrides:
equals in class java.lang.Object
Returns:
true if object is not null, is an instance of BooleanData, and has the same value; false otherwise

getBooleanData

public boolean getBooleanData()
Retrieves the boolean stored in the boolean model

Specified by:
getBooleanData in interface com.sas.lang.BooleanDataInterface
Returns:
boolean value

getText

public java.lang.String getText()
Retrieves the text value of the model.

Specified by:
getText in interface com.sas.lang.StringDataInterface
Returns:
the text value of the model

hashCode

public int hashCode()
Computes a hash code.

Overrides:
hashCode in class java.lang.Object
Returns:
hash code

setBooleanData

public void setBooleanData(boolean value)
Sets the boolean stored in the boolean model.

Specified by:
setBooleanData in interface com.sas.lang.BooleanDataInterface
Parameters:
value - boolean value

setText

public void setText(java.lang.String string)
Assigns the value of the object from a string value.

Specified by:
setText in interface com.sas.lang.StringDataInterface
Parameters:
string - a string representation of the text.
Throws:
java.lang.IllegalArgumentException - if the string cannot be converted.

toString

public java.lang.String toString()
Returns the string representation of the object.

Overrides:
toString in class java.lang.Object
Returns:
the string representation



Copyright © 2009 SAS Institute Inc. All Rights Reserved.