com.sas.lang
Class FloatData

com.sas.lang.FloatData
All Implemented Interfaces:
com.sas.beans.PropertyChangeSource, com.sas.beans.VetoableChangeSource, ComponentInterface, com.sas.lang.FloatDataInterface, 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 FloatData
implements com.sas.PublicClonable, com.sas.lang.FloatDataInterface, com.sas.lang.StringDataInterface

FloatData is an implementation of FloatDataInterface, for holding a float integer. The FloatData container has a bound floatData property, so the FloatData object fires a PropertyChangeEvent when the object is changed with setFloatData(Float).

Creating a FloatData Component

FloatData floatData1 = new FloatData(); floatData1.initialize();

The FloatData class also maintains a bound text property which is always equal to the String value of the floatData property.

Usage

The FloatData component stores float data:

floatData1.addPropertyChangeListener(listener); floatData1.setFloatData(l); ... l = floatData1.getFloatData();

See Also:
Serialized Form

Field Summary
static java.lang.String RB_KEY
           
 
Constructor Summary
FloatData()
          Default Constructor
FloatData(float value)
          Construct an object with an initial value.
 
Method Summary
 java.lang.Object clone()
          Creates a copy of the current model
 boolean equals(FloatData other)
          Tests if this object equals another FloatData object
 boolean equals(java.lang.Object object)
          Tests if this object equals another object
static com.sas.beans.ExtendedBeanInfo getExtendedBeanInfo()
          Returns the ExtendedBeanInfo for this class.
 float getFloatData()
          Retrieves the float stored in the float model
 java.lang.String getText()
          Retrieves the text value of the model.
 int hashCode()
          Computes a hash code.
 void setFloatData(float value)
          Sets the float stored in the float 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.
static java.lang.String toString(float d)
          toString converts the passed in float primitive to a String properly formatted for the current locale.
static java.lang.String toString(java.lang.Float value)
          toString converts the passed in Float object to a String properly formatted for the current locale.
static float valueOf(java.lang.String floatString)
          valueOf converts the passed in (locale specific) String to a float.
 
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

FloatData

public FloatData()
Default Constructor


FloatData

public FloatData(float 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

toString

public static java.lang.String toString(java.lang.Float value)
toString converts the passed in Float object to a String properly formatted for the current locale.

Parameters:
value - The Float value to convert to a String.
Returns:
A string representing the float value.

toString

public static java.lang.String toString(float d)
toString converts the passed in float primitive to a String properly formatted for the current locale.

Parameters:
value - The float value to convert to a String.
Returns:
A string representing the float value.

valueOf

public static float valueOf(java.lang.String floatString)
valueOf converts the passed in (locale specific) String to a float.

Parameters:
floatString - A String to convert to a float.

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(FloatData other)
Tests if this object equals another FloatData 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 FloatData, and has the same value; false otherwise

getFloatData

public float getFloatData()
Retrieves the float stored in the float model

Specified by:
getFloatData in interface com.sas.lang.FloatDataInterface
Returns:
float 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

setFloatData

public void setFloatData(float value)
Sets the float stored in the float model.

Specified by:
setFloatData in interface com.sas.lang.FloatDataInterface
Parameters:
value - float data

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.NumberFormatException - 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.