Record Class MeterReading
java.lang.Object
java.lang.Record
energy.eddie.regionconnector.fr.enedis.dto.readings.MeterReading
public record MeterReading(String usagePointId, MeterReading.ReadingType meterReadingType, MeterReading.Period period, Optional<String> valueType, MeterReading.CalculationMode calculationMode, Optional<Duration> granularity, List<MeterReading.Reading> readings, @Nullable List<Object> context)
extends Record
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enumstatic enumstatic final recordstatic final recordstatic final recordstatic enum -
Constructor Summary
ConstructorsConstructorDescriptionMeterReading(String usagePointId, MeterReading.ReadingType meterReadingType, MeterReading.Period period, Optional<String> valueType, MeterReading.CalculationMode calculationMode, Optional<Duration> granularity, List<MeterReading.Reading> readings, @Nullable List<Object> context) Creates an instance of aMeterReadingrecord class. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of thecalculationModerecord component.context()Returns the value of thecontextrecord component.final booleanIndicates whether some other object is "equal to" this one.Returns the value of thegranularityrecord component.final inthashCode()Returns a hash code value for this object.Returns the value of themeterReadingTyperecord component.period()Returns the value of theperiodrecord component.readings()Returns the value of thereadingsrecord component.final StringtoString()Returns a string representation of this record class.Returns the value of theusagePointIdrecord component.Returns the value of thevalueTyperecord component.
-
Constructor Details
-
MeterReading
public MeterReading(String usagePointId, MeterReading.ReadingType meterReadingType, MeterReading.Period period, Optional<String> valueType, MeterReading.CalculationMode calculationMode, Optional<Duration> granularity, List<MeterReading.Reading> readings, @Nullable List<Object> context) Creates an instance of aMeterReadingrecord class.- Parameters:
usagePointId- the value for theusagePointIdrecord componentmeterReadingType- the value for themeterReadingTyperecord componentperiod- the value for theperiodrecord componentvalueType- the value for thevalueTyperecord componentcalculationMode- the value for thecalculationModerecord componentgranularity- the value for thegranularityrecord componentreadings- the value for thereadingsrecord componentcontext- the value for thecontextrecord 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 withObjects::equals(Object,Object). -
usagePointId
Returns the value of theusagePointIdrecord component.- Returns:
- the value of the
usagePointIdrecord component
-
meterReadingType
Returns the value of themeterReadingTyperecord component.- Returns:
- the value of the
meterReadingTyperecord component
-
period
Returns the value of theperiodrecord component.- Returns:
- the value of the
periodrecord component
-
valueType
Returns the value of thevalueTyperecord component.- Returns:
- the value of the
valueTyperecord component
-
calculationMode
Returns the value of thecalculationModerecord component.- Returns:
- the value of the
calculationModerecord component
-
granularity
Returns the value of thegranularityrecord component.- Returns:
- the value of the
granularityrecord component
-
readings
Returns the value of thereadingsrecord component.- Returns:
- the value of the
readingsrecord component
-
context
Returns the value of thecontextrecord component.- Returns:
- the value of the
contextrecord component
-