com.sas.lang
Class ByteData

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

ByteData is an implementation of ByteDataInterface, for holding a byte integer. The ByteData container has a bound byteData property, so the ByteData object fires a PropertyChangeEvent when the object is changed with setByteData(Byte).

Creating a ByteData Component

ByteData byteData1 = new ByteData(); byteData1.initialize();

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

Usage

The ByteData component stores byte data:

byteData1.addPropertyChangeListener(listener); byteData1.setByteData(l); ... l = byteData1.getByteData();

See Also:
Serialized Form

Field Summary
static java.lang.String RB_KEY
           
 
Constructor Summary
ByteData()
          Default Constructor
ByteData(byte value)
          Construct an object with an initial value.
 
Method Summary
 java.lang.Object clone()
          Creates a copy of the current model
 boolean equals(ByteData other)
          Tests if this object equals another ByteData object
 boolean equals(java.lang.Object object)
          Test if this object equals another object
 byte getByteData()
          Retrieves the byte stored in the byte 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 setByteData(byte value)
          Sets the byte stored in the byte 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

ByteData

public ByteData()
Default Constructor


ByteData

public ByteData(byte 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()
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

getByteData

public byte getByteData()
Retrieves the byte stored in the byte model

Specified by:
getByteData in interface com.sas.lang.ByteDataInterface
Returns:
byte value

setByteData

public void setByteData(byte value)
Sets the byte stored in the byte model.

Specified by:
setByteData in interface com.sas.lang.ByteDataInterface
Parameters:
value - byte data

toString

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

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

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

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. The first character is used as the value
Throws:
java.lang.IllegalArgumentException - if the string cannot be converted or the string length is 0.

equals

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

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

equals

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

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

hashCode

public int hashCode()
Computes a hash code.

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



Copyright © 2009 SAS Institute Inc. All Rights Reserved.