|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.gargoylesoftware.base.testing.SampleBean
public class SampleBean
A simple bean class that can be used for testing purposes. All properties fire PropertyChangeEvents when changed.
Field Summary | |
---|---|
private int |
age_
|
private java.lang.String |
name_
|
private java.beans.PropertyChangeSupport |
propertyChangeSupport_
|
private static long |
serialVersionUID
|
Constructor Summary | |
---|---|
SampleBean()
Create a new instance. |
|
SampleBean(java.lang.String name,
int age)
Create a new instance. |
Method Summary | |
---|---|
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. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
private static final long serialVersionUID
private final java.beans.PropertyChangeSupport propertyChangeSupport_
private java.lang.String name_
private int age_
Constructor Detail |
---|
public SampleBean()
public SampleBean(java.lang.String name, int age)
name
- The name.age
- The age.Method Detail |
---|
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 check
DetailedNullPointerException
- If fieldValue is null
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |