|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjmri.implementation.AbstractNamedBean
public abstract class AbstractNamedBean
Abstract base for the NamedBean interface.
Implements the parameter binding support.
| Field Summary |
|---|
| Fields inherited from interface jmri.NamedBean |
|---|
INCONSISTENT, UNKNOWN |
| Constructor Summary | |
|---|---|
AbstractNamedBean(String sys)
|
|
AbstractNamedBean(String sys,
String user)
|
|
| Method Summary | |
|---|---|
void |
addPropertyChangeListener(PropertyChangeListener l)
Request a call-back when a bound property changes. |
void |
dispose()
Deactivate this object, so that it releases as many resources as possible and no longer effects others. |
protected void |
firePropertyChange(String p,
Object old,
Object n)
|
String |
getComment()
Get associated comment text. |
String |
getDisplayName()
|
int |
getNumPropertyChangeListeners()
Number of current listeners. |
PropertyChangeListener[] |
getPropertyChangeListeners()
|
String |
getSystemName()
Get a system-specific name. |
String |
getUserName()
|
void |
removePropertyChangeListener(PropertyChangeListener l)
Remove a request for a call-back when a bound property changes. |
void |
setComment(String comment)
Set associated comment text. |
void |
setUserName(String s)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface jmri.NamedBean |
|---|
getState, setState |
| Constructor Detail |
|---|
public AbstractNamedBean(String sys)
public AbstractNamedBean(String sys,
String user)
| Method Detail |
|---|
public String getComment()
getComment in interface NamedBeanpublic void setComment(String comment)
Comments can be any valid text.
setComment in interface NamedBeancomment - Null means no comment associated.public String getDisplayName()
getDisplayName in interface NamedBeanpublic void addPropertyChangeListener(PropertyChangeListener l)
NamedBean
addPropertyChangeListener in interface NamedBeanpublic void removePropertyChangeListener(PropertyChangeListener l)
NamedBean
removePropertyChangeListener in interface NamedBeanpublic int getNumPropertyChangeListeners()
getNumPropertyChangeListeners in interface NamedBeanpublic PropertyChangeListener[] getPropertyChangeListeners()
public String getSystemName()
NamedBean
getSystemName in interface NamedBeanpublic String getUserName()
getUserName in interface NamedBeanpublic void setUserName(String s)
setUserName in interface NamedBean
protected void firePropertyChange(String p,
Object old,
Object n)
public void dispose()
NamedBeanFor example, if this object has listeners, after a call to this method it should no longer notify those listeners. Any native or system-wide resources it maintains should be released, including threads, files, etc.
It is an error to invoke any other methods on this object once dispose() has been called. Note, however, that there is no guarantee about behavior in that case.
Afterwards, references to this object may still exist elsewhere, preventing its garbage collection. But it's formally dead, and shouldn't be keeping any other objects alive. Therefore, this method should null out any references to other objects that this NamedBean contained.
dispose in interface NamedBean
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||