public class NamedObject extends AttributeObject
Constructor and Description |
---|
NamedObject()
Creates a new NamedObject instance with initial null name.
|
NamedObject(NamedObject orig)
Creates a new NamedObject which has the same name as a given
NamedObject.
|
NamedObject(java.lang.String name)
Creates a new NamedObject instance.
|
Modifier and Type | Method and Description |
---|---|
java.lang.String |
getName()
Returns the name of this NamedObject.
|
boolean |
hasName()
Determines whether this NamedObject has a name.
|
void |
setName(java.lang.String name)
Sets the name of this NamedObject.
|
getAttribute, setAttribute
public NamedObject()
public NamedObject(java.lang.String name)
name
- name of the new NamedObject, or null
if it doesn't have a
namepublic NamedObject(NamedObject orig)
public void setName(java.lang.String name)
name
- new name of this NamedObject, or null
to remove the current
name of this NamedObjectpublic java.lang.String getName()
null
if this NamedObject
does not have a namepublic boolean hasName()