byucc.jhdl.synth.graph
Class NamedObject

java.lang.Object
  extended bybyucc.jhdl.synth.graph.NamedObject
All Implemented Interfaces:
Nameable
Direct Known Subclasses:
Graph, Vertex

public abstract class NamedObject
extends java.lang.Object
implements Nameable

An abstract class for an object which can have a name

Author:
Mike Wirthlin

Field Summary
protected  java.lang.String name
           
 
Constructor Summary
NamedObject()
          Default constructor - Constructs a new NamedObject
NamedObject(Nameable owner, java.lang.String n)
          Constructs a new NamedObject with the given owner and name
NamedObject(java.lang.String name)
          Constructs a new NamedObject with the given name
 
Method Summary
 java.lang.String getName()
          Returns the name of this object.
 void setName(java.lang.String n)
          Sets the name of this object.
 java.lang.String toString()
          Gets a String representation of this NamedObject
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

name

protected java.lang.String name
Constructor Detail

NamedObject

public NamedObject()
Default constructor - Constructs a new NamedObject


NamedObject

public NamedObject(java.lang.String name)
Constructs a new NamedObject with the given name

Parameters:
name - the name for this object

NamedObject

public NamedObject(Nameable owner,
                   java.lang.String n)
Constructs a new NamedObject with the given owner and name

Parameters:
owner - the owner of this object, (ie. an object which can define a namespace for this object.
Method Detail

getName

public java.lang.String getName()
Returns the name of this object.

Specified by:
getName in interface Nameable
Returns:
the name of this object.

setName

public void setName(java.lang.String n)
Sets the name of this object.

Specified by:
setName in interface Nameable
Parameters:
n - the new name for this object.

toString

public java.lang.String toString()
Gets a String representation of this NamedObject

Returns:
a String containing this object's name


Copyright ? 2006 Brigham Young University, Configurable Computing Laboratory. All Rights Reserved.