public class NamedObject extends Object implements INamedObject
| Modifier and Type | Field and Description |
|---|---|
static String |
PROPERTY_NAME
Constant used for those property change events that get triggered when
the name of the object gets changed.
|
| Constructor and Description |
|---|
NamedObject()
Constructs a new named object.
|
NamedObject(String name)
Constructs a new named object with the given name.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addPropertyChangeListener(PropertyChangeListener l)
Adds a property change listener to the named object.
|
int |
compareTo(INamedObject o) |
protected PropertyChangeSupport |
getChangeSupport()
Returns the property change support object so that subclasses can use it
to fire property change events.
|
String |
getName()
Returns the value of the object's name attribute (the object's name).
|
void |
removePropertyChangeListener(PropertyChangeListener l)
Removes a property change listener from the named object.
|
void |
setName(String name)
Assigns a new name to the object.
|
String |
toString() |
public static final String PROPERTY_NAME
setName(String),
addPropertyChangeListener(PropertyChangeListener),
Constant Field Valuespublic NamedObject(String name)
name - the object's namepublic NamedObject()
setName(String)public void setName(String name)
name - the new object namegetName()public String getName()
INamedObjectgetName in interface INamedObjectpublic void addPropertyChangeListener(PropertyChangeListener l)
l - the new listenerremovePropertyChangeListener(PropertyChangeListener)public void removePropertyChangeListener(PropertyChangeListener l)
l - the listener that will be removedaddPropertyChangeListener(PropertyChangeListener)protected PropertyChangeSupport getChangeSupport()
public int compareTo(INamedObject o)
compareTo in interface Comparable<INamedObject>Copyright © 2006–2020 Dirk Lemmermann Software & Consulting. All rights reserved.