Class Resistor

java.lang.Object
   |
   +----Element
           |
           +----Resistor

public class Resistor
extends Element
Resistor


Constructor Index

 o Resistor()
Constructs default Resistor.
 o Resistor(double)
Constructs new Resistor with given resistance.
 o Resistor(double, int)
Constructs new Resistor with given resistance and order.
 o Resistor(Resistor)
Constructs new Resistor from given one.

Method Index

 o getCurrent(int, double)
Main function for calculations.
 o getProperties()
This method is called to get values of element.
 o getTip(int)
Returns tool tip for this element.
 o parseString(String)
This method is called to load new values to element from string.
 o setProperties(String[])
This method is called to set new values to element.

Constructors

 o Resistor
 public Resistor()
Constructs default Resistor.

 o Resistor
 public Resistor(Resistor e)
Constructs new Resistor from given one.

Parameters:
e - Resisitor to copy.
 o Resistor
 public Resistor(double r)
Constructs new Resistor with given resistance.

Parameters:
r - resistance.
 o Resistor
 public Resistor(double r,
                 int order)
Constructs new Resistor with given resistance and order.

Parameters:
r - resistance.
order - order(0-piko, 1-nano, 2-micro, 3-milli, 4-none, 5-kilo, 6-Mega, 7-Giga).

Methods

 o getCurrent
 public Polynom getCurrent(int dir,
                           double timeStep)
Main function for calculations.

Overrides:
getCurrent in class Element
 o getProperties
 public Object[] getProperties()
This method is called to get values of element. Six Objects for each parameter:

Returns:
array of Objects.
Overrides:
getProperties in class Element
 o setProperties
 public void setProperties(String props[])
This method is called to set new values to element. Two strings for each parameter:

Parameters:
props - array with pairs of Strings.
Overrides:
setProperties in class Element
 o parseString
 public void parseString(String values) throws ParseException
This method is called to load new values to element from string. String should be like "value,order;value,order;etc.".

Parameters:
values - new values for element in string in format given above.
Throws: ParseException
if string format is incorrect.
Overrides:
parseString in class Element
 o getTip
 public String getTip(int type)
Returns tool tip for this element.

Overrides:
getTip in class Element