|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectbyucc.edif.NamedPropertyObject
public abstract class NamedPropertyObject
Represents a container class that contains an EdifNameable
object (to define the name of this object) as well as a PropertyList object to store all properties of the object. This
class is used as a base class for many of the Edif objects used in
this package that require a name as well as properties.
To save memory, this class will not create any PropertyList object unless properties are added to the object.
| Field Summary | |
|---|---|
private EdifNameable |
_name
The EdifNameable object that names this object. |
private PropertyList |
_pl
The PropertyList object. |
| Constructor Summary | |
|---|---|
NamedPropertyObject(EdifNameable name)
Construct a NamedPropertyObject with the specified name object as its value |
|
NamedPropertyObject(java.lang.String name)
Construct a NamedPropertyObject with the specified name |
|
| Method Summary | |
|---|---|
void |
addProperty(Property p)
Add a single property to this object. |
void |
addProperty(java.lang.String name,
EdifTypedValue value)
Add a single property to this object. |
void |
addPropertyList(PropertyList pList)
Add a list of properties to the object. |
void |
copyProperties(Properties props)
Copy properties of given properties object into this object. |
boolean |
equals(NamedPropertyObject cmp)
|
boolean |
equalsProperties(NamedPropertyObject cmp)
Return True if the passed-in NamedPropertyObject's PropertyList matches the PropertyList Object contained in this Object. |
EdifNameable |
getEdifNameable()
Get the EdifNameable object that names this object. |
java.lang.String |
getName()
Get the Edif name of this object. |
java.lang.String |
getOldName()
Return the "old name" associated with this Named object. |
Property |
getProperty(java.lang.String str)
Get a property from this object. |
PropertyList |
getPropertyList()
Return the complete PropertyList of this object. |
(package private) void |
rename(EdifNameable newName)
Rename this object |
(package private) void |
rename(java.lang.String newName)
Rename this object. |
(package private) void |
rename(java.lang.String newName,
java.lang.String oldName)
Rename this object. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
private EdifNameable _name
private PropertyList _pl
| Constructor Detail |
|---|
public NamedPropertyObject(java.lang.String name)
throws InvalidEdifNameException
name - The name of this new NamedPropertyObject
InvalidEdifNameExceptionpublic NamedPropertyObject(EdifNameable name)
name - The object containing name information for this new
NamedPropertyObject| Method Detail |
|---|
public void addProperty(java.lang.String name,
EdifTypedValue value)
name - The name of the property objectvalue - The instance specific value of this propertypublic void addProperty(Property p)
addProperty in interface Propertiesp - The Property Object to add to this objects list of
properties.public void addPropertyList(PropertyList pList)
pList - The list of properties to add to this object.public void copyProperties(Properties props)
copyProperties in interface Propertiespublic boolean equals(NamedPropertyObject cmp)
public boolean equalsProperties(NamedPropertyObject cmp)
cmp - The Object whose PropertyList Object will be matched
up with the one in this Object
public EdifNameable getEdifNameable()
EdifNameable Object that contains the name
information of this objectpublic java.lang.String getName()
public java.lang.String getOldName()
public Property getProperty(java.lang.String str)
getProperty in interface Propertiesstr - The 'key' of the property
public PropertyList getPropertyList()
getPropertyList in interface PropertiesPropertyList Object containing all the
properties of this object.
TODO: Should we return the list or a copy of the list?
Returning the actual list seems dangerous as the list
can be easily modified.
void rename(java.lang.String newName,
java.lang.String oldName)
newName - The new name for this objectoldName - The new name for this objectvoid rename(java.lang.String newName)
newName - The new name for this objectvoid rename(EdifNameable newName)
newName - A NamedObject representing the new name for this object
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||