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, boolean widthOnX)
          Constructor creates a PrimitiveNodeSize with a given size.
 
Method Summary
 double getDoubleAlongX()
          Method to get correct value along X axis.
 double getDoubleAlongY()
          Method to get correct value along Y axis.
 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.String getLengthInString()
          Method to return the actual length of the element based on the object used to store the information.
 java.lang.Object getWidth()
          Method to return the width of this TransistorSize.
 java.lang.String getWidthInString()
          Method to return the actual width of the element based on the object used to store the information.
 
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,
                         boolean widthOnX)
Constructor creates a PrimitiveNodeSize with a given size.

Parameters:
width - the width of the PrimitiveNodeSize.
length - the length of the PrimitiveNodeSize.
widthOnX -
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.

getDoubleAlongX

public double getDoubleAlongX()
Method to get correct value along X axis. This is critical for resistors and transistors whose poly is along Y

Returns:
the correct X value.

getDoubleAlongY

public double getDoubleAlongY()
Method to get correct value along Y axis. This is critical for resistors and transistors whose poly is along Y.

Returns:
correct Y value.

getWidthInString

public java.lang.String getWidthInString()
Method to return the actual width of the element based on the object used to store the information. Most of the time is a Double but Schematics might use different values depending on the Varialbles stored.

Returns:
String represented the value

getLengthInString

public java.lang.String getLengthInString()
Method to return the actual length of the element based on the object used to store the information. Most of the time is a Double but Schematics might use different values depending on the Varialbles stored.

Returns:
String represented the value