Record Class ElectricalModel.Diode

java.lang.Object
java.lang.Record
org.cha0scollective.wwpg.api.ElectricalModel.Diode
All Implemented Interfaces:
ElectricalModel
Enclosing interface:
ElectricalModel

public static record ElectricalModel.Diode(double saturationCurrentAmps, double seriesResistanceOhms, double temperatureCelsius, double idealityFactor) extends Record implements ElectricalModel
PG-native silicon PN-junction model, with temperature compensation and series resistance. Positive node is the anode. This is not an ideal diode or a bare Shockley equation. API 1.0 does not enable optional avalanche breakdown.
  • Constructor Details

    • Diode

      public Diode(double saturationCurrentAmps, double seriesResistanceOhms, double temperatureCelsius, double idealityFactor)
      Creates an instance of a Diode record class.
      Parameters:
      saturationCurrentAmps - the value for the saturationCurrentAmps record component
      seriesResistanceOhms - the value for the seriesResistanceOhms record component
      temperatureCelsius - the value for the temperatureCelsius record component
      idealityFactor - the value for the idealityFactor record component
  • Method Details

    • toString

      public final String toString()
      Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • hashCode

      public final int hashCode()
      Returns a hash code value for this object. The value is derived from the hash code of each of the record components.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared with '=='.
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • saturationCurrentAmps

      public double saturationCurrentAmps()
      Returns the value of the saturationCurrentAmps record component.
      Returns:
      the value of the saturationCurrentAmps record component
    • seriesResistanceOhms

      public double seriesResistanceOhms()
      Returns the value of the seriesResistanceOhms record component.
      Returns:
      the value of the seriesResistanceOhms record component
    • temperatureCelsius

      public double temperatureCelsius()
      Returns the value of the temperatureCelsius record component.
      Returns:
      the value of the temperatureCelsius record component
    • idealityFactor

      public double idealityFactor()
      Returns the value of the idealityFactor record component.
      Returns:
      the value of the idealityFactor record component