com.sun.electric.database.hierarchy
Interface Nodable

All Known Implementing Classes:
NodeInst

public interface Nodable

This interface defines real or virtual instance of NodeProto in a Cell..


Method Summary
 boolean contains(NodeInst ni, int arrayIndex)
          Returns true if this Nodable wraps NodeInst ni.
 java.util.Iterator<Variable> getDefinedParameters()
          Method to return an Iterator over defined Parameters on this Nodable.
 java.lang.String getName()
          Method to return the name of this Nodable.
 Name getNameKey()
          Method to return the name key of this Nodable.
 NodeInst getNodeInst()
          Get the NodeInst associated with this Nodable
 Variable getParameter(Variable.Key key)
          Method to return the Parameter on this Nodable with the given key.
 Variable getParameterOrVariable(Variable.Key key)
          Method to return the Parameter or Variable on this Nodable with a given key.
 java.util.Iterator<Variable> getParameters()
          Method to return an Iterator over all Parameters on this Nodable.
 Cell getParent()
          Method to return the Cell that contains this Nodable.
 NodeProto getProto()
          Method to return the prototype of this Nodable.
 Variable getVar(Variable.Key key)
          Method to return the Variable on this ElectricObject with a given key.
 boolean isCellInstance()
          Method to tell whether this Nodable is a cell instance.
 boolean isDefinedParameter(Variable.Key key)
          Method to tell if the Variable.Key is a defined parameters of this Nodable.
 java.lang.String toString()
          Returns a printable version of this Nodable.
 

Method Detail

getProto

NodeProto getProto()
Method to return the prototype of this Nodable.

Returns:
the prototype of this Nodable.

isCellInstance

boolean isCellInstance()
Method to tell whether this Nodable is a cell instance.

Returns:
true if this Nodable is a cell instance, false if it is a primitive

getParent

Cell getParent()
Method to return the Cell that contains this Nodable.

Returns:
the Cell that contains this Nodable.

getName

java.lang.String getName()
Method to return the name of this Nodable.

Returns:
the name of this Nodable.

getNameKey

Name getNameKey()
Method to return the name key of this Nodable.

Returns:
the name key of this Nodable.

getVar

Variable getVar(Variable.Key key)
Method to return the Variable on this ElectricObject with a given key.

Parameters:
key - the key of the Variable.
Returns:
the Variable with that key, or null if there is no such Variable.

getParameter

Variable getParameter(Variable.Key key)
Method to return the Parameter on this Nodable with the given key. If the parameter is not found on this Nodable, it is also searched for on the default var owner.

Parameters:
key - the key of the Parameter
Returns:
the Parameter with that key, that may exist either on this object or the default owner. Returns null if none found.

getParameterOrVariable

Variable getParameterOrVariable(Variable.Key key)
Method to return the Parameter or Variable on this Nodable with a given key.

Parameters:
key - the key of the Parameter or Variable.
Returns:
the Parameter or Variable with that key, or null if there is no such Parameter or Variable Variable.
Throws:
java.lang.NullPointerException - if key is null

isDefinedParameter

boolean isDefinedParameter(Variable.Key key)
Method to tell if the Variable.Key is a defined parameters of this Nodable. Parameters which are not defined on IconNodeInst take default values from Icon Cell.

Parameters:
key - the key of the parameter
Returns:
true if the key is a definded parameter of this Nodable

getParameters

java.util.Iterator<Variable> getParameters()
Method to return an Iterator over all Parameters on this Nodable. This may also include any parameters on the defaultVarOwner object that are not on this Nodable.

Returns:
an Iterator over all Parameters on this Nodable.

getDefinedParameters

java.util.Iterator<Variable> getDefinedParameters()
Method to return an Iterator over defined Parameters on this Nodable. This doesn't include any parameters on the defaultVarOwner object that are not on this Nodable.

Returns:
an Iterator over defined Parameters on this Nodable.

toString

java.lang.String toString()
Returns a printable version of this Nodable.

Overrides:
toString in class java.lang.Object
Returns:
a printable version of this Nodable.

contains

boolean contains(NodeInst ni,
                 int arrayIndex)
Returns true if this Nodable wraps NodeInst ni. Note that this Nodable may actually *be* ni, or it may simply wrap it and other NodeInsts and act as a proxy.

Parameters:
ni - a NodeInst
Returns:
true if this Nodable contains ni, false otherwise

getNodeInst

NodeInst getNodeInst()
Get the NodeInst associated with this Nodable

Returns:
the NodeInst associate with this Nodable