Record Class MeterReading.Reading
java.lang.Object
java.lang.Record
energy.eddie.regionconnector.fr.enedis.dto.readings.MeterReading.Reading
- Enclosing class:
MeterReading
public static record MeterReading.Reading(MeterReading.Direction direction, String physicalDirection, String unit, List<MeterReading.Point> points, @Nullable List<Object> calendar)
extends Record
-
Constructor Summary
ConstructorsConstructorDescriptionReading(MeterReading.Direction direction, String physicalDirection, String unit, List<MeterReading.Point> points, @Nullable List<Object> calendar) Creates an instance of aReadingrecord class. -
Method Summary
Modifier and TypeMethodDescriptioncalendar()Returns the value of thecalendarrecord component.Returns the value of thedirectionrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.Returns the value of thephysicalDirectionrecord component.points()Returns the value of thepointsrecord component.final StringtoString()Returns a string representation of this record class.unit()Returns the value of theunitrecord component.
-
Constructor Details
-
Reading
public Reading(MeterReading.Direction direction, String physicalDirection, String unit, List<MeterReading.Point> points, @Nullable List<Object> calendar) Creates an instance of aReadingrecord class.- Parameters:
direction- the value for thedirectionrecord componentphysicalDirection- the value for thephysicalDirectionrecord componentunit- the value for theunitrecord componentpoints- the value for thepointsrecord componentcalendar- the value for thecalendarrecord 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). -
direction
Returns the value of thedirectionrecord component.- Returns:
- the value of the
directionrecord component
-
physicalDirection
Returns the value of thephysicalDirectionrecord component.- Returns:
- the value of the
physicalDirectionrecord component
-
unit
Returns the value of theunitrecord component.- Returns:
- the value of the
unitrecord component
-
points
Returns the value of thepointsrecord component.- Returns:
- the value of the
pointsrecord component
-
calendar
Returns the value of thecalendarrecord component.- Returns:
- the value of the
calendarrecord component
-