Package dev.digiried.wattpilot.dto
Record Class ChargingMetrics
java.lang.Object
java.lang.Record
dev.digiried.wattpilot.dto.ChargingMetrics
- Record Components:
power- total power in watts (W)voltage1- phase 1 voltage in volts (V)voltage2- phase 2 voltage in volts (V)voltage3- phase 3 voltage in volts (V)amperage1- phase 1 amperage in amperes (A)amperage2- phase 2 amperage in amperes (A)amperage3- phase 3 amperage in amperes (A)power1- power of phase 1 in watts (W)power2- power of phase 2 in watts (W)power3- power of phase 3 in watts (W)
public record ChargingMetrics(float power, int voltage1, int voltage2, int voltage3, int amperage1, int amperage2, int amperage3, float power1, float power2, float power3)
extends Record
Record for charging metrics.
- Author:
- Florian Hotze - Initial contribution
-
Constructor Summary
ConstructorsConstructorDescriptionChargingMetrics(float power, int voltage1, int voltage2, int voltage3, int amperage1, int amperage2, int amperage3, float power1, float power2, float power3) Creates an instance of aChargingMetricsrecord class. -
Method Summary
Modifier and TypeMethodDescriptionintReturns the value of theamperage1record component.intReturns the value of theamperage2record component.intReturns the value of theamperage3record component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.floatpower()Returns the value of thepowerrecord component.floatpower1()Returns the value of thepower1record component.floatpower2()Returns the value of thepower2record component.floatpower3()Returns the value of thepower3record component.toString()Returns a string representation of this record class.intvoltage1()Returns the value of thevoltage1record component.intvoltage2()Returns the value of thevoltage2record component.intvoltage3()Returns the value of thevoltage3record component.
-
Constructor Details
-
ChargingMetrics
public ChargingMetrics(float power, int voltage1, int voltage2, int voltage3, int amperage1, int amperage2, int amperage3, float power1, float power2, float power3) Creates an instance of aChargingMetricsrecord class.- Parameters:
power- the value for thepowerrecord componentvoltage1- the value for thevoltage1record componentvoltage2- the value for thevoltage2record componentvoltage3- the value for thevoltage3record componentamperage1- the value for theamperage1record componentamperage2- the value for theamperage2record componentamperage3- the value for theamperage3record componentpower1- the value for thepower1record componentpower2- the value for thepower2record componentpower3- the value for thepower3record component
-
-
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 '=='. -
power
public float power()Returns the value of thepowerrecord component.- Returns:
- the value of the
powerrecord component
-
voltage1
public int voltage1()Returns the value of thevoltage1record component.- Returns:
- the value of the
voltage1record component
-
voltage2
public int voltage2()Returns the value of thevoltage2record component.- Returns:
- the value of the
voltage2record component
-
voltage3
public int voltage3()Returns the value of thevoltage3record component.- Returns:
- the value of the
voltage3record component
-
amperage1
public int amperage1()Returns the value of theamperage1record component.- Returns:
- the value of the
amperage1record component
-
amperage2
public int amperage2()Returns the value of theamperage2record component.- Returns:
- the value of the
amperage2record component
-
amperage3
public int amperage3()Returns the value of theamperage3record component.- Returns:
- the value of the
amperage3record component
-
power1
public float power1()Returns the value of thepower1record component.- Returns:
- the value of the
power1record component
-
power2
public float power2()Returns the value of thepower2record component.- Returns:
- the value of the
power2record component
-
power3
public float power3()Returns the value of thepower3record component.- Returns:
- the value of the
power3record component
-