Package org.cha0scollective.wwpg.api
Record Class ElementState.Inductor
java.lang.Object
java.lang.Record
org.cha0scollective.wwpg.api.ElementState.Inductor
- All Implemented Interfaces:
ElementState
- Enclosing interface:
ElementState
public static record ElementState.Inductor(double currentAmps)
extends Record
implements ElementState
Inductor current from positive node to negative node, in amperes.
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.cha0scollective.wwpg.api.ElementState
ElementState.Capacitor, ElementState.Inductor -
Constructor Summary
ConstructorsConstructorDescriptionInductor(double currentAmps) Constructs ElementState.Inductor with validated captured values. -
Method Summary
Modifier and TypeMethodDescriptiondoubleReturns the value of thecurrentAmpsrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
Inductor
public Inductor(double currentAmps) Constructs ElementState.Inductor with validated captured values.- Parameters:
currentAmps- accepted oriented inductor current in amperes; finite, with magnitude at most 1e15 (inclusive)- Throws:
IllegalArgumentException- if a numeric, key, count or structural constraint is violated
-
-
Method Details
-
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. -
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. -
equals
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 '=='. -
currentAmps
public double currentAmps()Returns the value of thecurrentAmpsrecord component.- Returns:
- the value of the
currentAmpsrecord component
-