com.sun.electric.tool.ncc.netlist
Class Wire

java.lang.Object
  extended by com.sun.electric.tool.ncc.netlist.NetObject
      extended by com.sun.electric.tool.ncc.netlist.Wire
All Implemented Interfaces:
NetObjReport.NetObjReportable, WireReport.WireReportable

public class Wire
extends NetObject
implements WireReport.WireReportable


Nested Class Summary
 
Nested classes/interfaces inherited from class com.sun.electric.tool.ncc.netlist.NetObject
NetObject.Type
 
Constructor Summary
Wire(NccNameProxy.WireNameProxy name)
           
 
Method Summary
 void add(Part p)
          add a Part to this Wire
 Port addExport(java.lang.String portName, PortCharacteristic type, boolean oneNamePerPort)
          add a Port to this Wire
 void checkMe(Circuit parent)
          check that this Wire is properly structured.
 java.lang.Integer computeHashCode()
           
 java.lang.String connectionDescription(int maxParts)
          Get a String indicating up to N connections for this NetObject.
 java.util.Iterator getConnected()
           
 java.lang.String getName()
          instance name qualified by path prefix
 NccNameProxy.WireNameProxy getNameProxy()
           
 NetObject.Type getNetObjType()
          Distinguish Parts, Wires, and Ports.
 java.util.Iterator<Part> getParts()
           
 Port getPort()
           
 java.lang.String instanceDescription()
          human readable identification of instance
 boolean isDeleted()
           
 int numParts()
          count the number of Parts connected to this wire.
 void putInFinalForm()
          Remove deleted Parts.
 void setDeleted()
          Mark this wire deleted and release all storage
 boolean touches(Part p)
          Does this Wire touch the given Part?
 boolean touches(Port p)
           
 java.lang.String valueDescription()
          human readable enumeration of sizes and other values
 
Methods inherited from class com.sun.electric.tool.ncc.netlist.NetObject
error, fullDescription, getCode, getParent, setParent, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface com.sun.electric.tool.ncc.result.NetObjReport.NetObjReportable
fullDescription
 

Constructor Detail

Wire

public Wire(NccNameProxy.WireNameProxy name)
Method Detail

getName

public java.lang.String getName()
Description copied from class: NetObject
instance name qualified by path prefix

Specified by:
getName in interface NetObjReport.NetObjReportable
Specified by:
getName in class NetObject

getNameProxy

public NccNameProxy.WireNameProxy getNameProxy()
Specified by:
getNameProxy in interface WireReport.WireReportable

getParts

public java.util.Iterator<Part> getParts()

getConnected

public java.util.Iterator getConnected()
Specified by:
getConnected in class NetObject

add

public void add(Part p)
add a Part to this Wire

Parameters:
p - the Part to add

addExport

public Port addExport(java.lang.String portName,
                      PortCharacteristic type,
                      boolean oneNamePerPort)
add a Port to this Wire

Parameters:
portName - the Port to add

putInFinalForm

public void putInFinalForm()
Remove deleted Parts. Remove duplicate Parts. Minimize storage use.


getPort

public Port getPort()
Returns:
the Port on this Wire. Return null if wire has no Export attached

getNetObjType

public NetObject.Type getNetObjType()
Description copied from class: NetObject
Distinguish Parts, Wires, and Ports.

Specified by:
getNetObjType in class NetObject
Returns:
PART or WIRE or PORT

setDeleted

public void setDeleted()
Mark this wire deleted and release all storage


isDeleted

public boolean isDeleted()
Specified by:
isDeleted in class NetObject

checkMe

public void checkMe(Circuit parent)
check that this Wire is properly structured. check each connection to see if it points back

Specified by:
checkMe in class NetObject
Parameters:
parent - the wire's parent

touches

public boolean touches(Part p)
Does this Wire touch the given Part?

Parameters:
p - the Part to test
Returns:
true if it touches, false if not

touches

public boolean touches(Port p)

computeHashCode

public java.lang.Integer computeHashCode()

numParts

public int numParts()
count the number of Parts connected to this wire.

Returns:
an int with the number of connections

instanceDescription

public java.lang.String instanceDescription()
Description copied from class: NetObject
human readable identification of instance

Specified by:
instanceDescription in interface NetObjReport.NetObjReportable
Specified by:
instanceDescription in class NetObject
Returns:
a String describing Cell containing wire and instance path

valueDescription

public java.lang.String valueDescription()
Description copied from class: NetObject
human readable enumeration of sizes and other values

Specified by:
valueDescription in class NetObject

connectionDescription

public java.lang.String connectionDescription(int maxParts)
Get a String indicating up to N connections for this NetObject.

Specified by:
connectionDescription in class NetObject
Parameters:
maxParts - the maximum number of connections to list
Returns:
a String of connections.