com.sun.electric.technology
Class PrimitiveNodeSize

java.lang.Object
  extended by com.sun.electric.technology.PrimitiveNodeSize
Direct Known Subclasses:
TransistorSize

public class PrimitiveNodeSize
extends java.lang.Object

Holds the Width and Length of a PrimitiveNode that is a transistor. This holds the width, length, and area as objects, because the width and length, may be specified as strings if they are java code, or just numbers.


Field Summary
protected  java.lang.Object length
           
protected  java.lang.Object width
           
 
Constructor Summary
PrimitiveNodeSize(java.lang.Object width, java.lang.Object length)
          Constructor creates a PrimitiveNodeSize with a given size.
 
Method Summary
 double getDoubleLength()
          Gets the length *ONLY IF* the length can be converted to a double.
 double getDoubleWidth()
          Gets the width *ONLY IF* the width can be converted to a double.
 java.lang.Object getLength()
          Method to return the length of this TransistorSize.
 java.lang.Object getWidth()
          Method to return the width of this TransistorSize.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

width

protected final java.lang.Object width

length

protected final java.lang.Object length
Constructor Detail

PrimitiveNodeSize

public PrimitiveNodeSize(java.lang.Object width,
                         java.lang.Object length)
Constructor creates a PrimitiveNodeSize with a given size.

Parameters:
width - the width of the PrimitiveNodeSize.
length - the length of the PrimitiveNodeSize.
Method Detail

getWidth

public java.lang.Object getWidth()
Method to return the width of this TransistorSize.

Returns:
the width of this TransistorSize.

getLength

public java.lang.Object getLength()
Method to return the length of this TransistorSize.

Returns:
the length of this TransistorSize.

getDoubleWidth

public double getDoubleWidth()
Gets the width *ONLY IF* the width can be converted to a double. i.e. it is a Number or a parsable String. If it is some other type, this method returns zero.

Returns:
the width.

getDoubleLength

public double getDoubleLength()
Gets the length *ONLY IF* the length can be converted to a double. i.e. it is a Number or a parsable String. If it is some other type, this method returns zero.

Returns:
the length.