public class SampleBean
extends java.lang.Object
implements java.io.Serializable
| Modifier and Type | Field and Description |
|---|---|
private int |
age_ |
private java.lang.String |
name_ |
private java.beans.PropertyChangeSupport |
propertyChangeSupport_ |
private static long |
serialVersionUID |
| Constructor and Description |
|---|
SampleBean()
Create a new instance.
|
SampleBean(java.lang.String name,
int age)
Create a new instance.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addPropertyChangeListener(java.beans.PropertyChangeListener listener)
Add a property change listener
|
protected void |
assertNotNull(java.lang.String fieldName,
java.lang.Object fieldValue)
Verify that the specified value is not null.
|
int |
getAge()
Return the age.
|
java.lang.String |
getName()
Return the name.
|
void |
removePropertyChangeListener(java.beans.PropertyChangeListener listener)
Remove a property change listener
|
void |
setAge(int age)
Set the age.
|
void |
setName(java.lang.String name)
Set the name.
|
private static final long serialVersionUID
private final java.beans.PropertyChangeSupport propertyChangeSupport_
private java.lang.String name_
private int age_
public SampleBean()
public SampleBean(java.lang.String name,
int age)
name - The name.age - The age.public void addPropertyChangeListener(java.beans.PropertyChangeListener listener)
listener - The listenerpublic void removePropertyChangeListener(java.beans.PropertyChangeListener listener)
listener - The listenerpublic java.lang.String getName()
public void setName(java.lang.String name)
name - The new name.public int getAge()
public void setAge(int age)
age - The new age.protected final void assertNotNull(java.lang.String fieldName,
java.lang.Object fieldValue)
throws DetailedNullPointerException
fieldName - The name of the field to checkfieldValue - The value of the field to checkDetailedNullPointerException - If fieldValue is null