Package de.chiflux.tesla.api
Record Class DriveState
java.lang.Object
java.lang.Record
de.chiflux.tesla.api.DriveState
- Record Components:
gps_as_of- gps_as_ofheading- headinglatitude- latitudelongitude- longitudepower- powershift_state- shift_statespeed- speedtimestamp- timestamp
public record DriveState(Long gps_as_of, Integer heading, Double latitude, Double longitude, Integer power, String shift_state, Double speed, Long timestamp)
extends Record
Dirce state
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.Returns the value of thegps_as_ofrecord component.final inthashCode()Returns a hash code value for this object.heading()Returns the value of theheadingrecord component.latitude()Returns the value of thelatituderecord component.Returns the value of thelongituderecord component.power()Returns the value of thepowerrecord component.Returns the value of theshift_staterecord component.speed()Returns the value of thespeedrecord component.Returns the value of thetimestamprecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
DriveState
public DriveState(Long gps_as_of, Integer heading, Double latitude, Double longitude, Integer power, String shift_state, Double speed, Long timestamp) Creates an instance of aDriveStaterecord class.- Parameters:
gps_as_of- the value for thegps_as_ofrecord componentheading- the value for theheadingrecord componentlatitude- the value for thelatituderecord componentlongitude- the value for thelongituderecord componentpower- the value for thepowerrecord componentshift_state- the value for theshift_staterecord componentspeed- the value for thespeedrecord componenttimestamp- the value for thetimestamprecord 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). -
gps_as_of
Returns the value of thegps_as_ofrecord component.- Returns:
- the value of the
gps_as_ofrecord component
-
heading
Returns the value of theheadingrecord component.- Returns:
- the value of the
headingrecord component
-
latitude
Returns the value of thelatituderecord component.- Returns:
- the value of the
latituderecord component
-
longitude
Returns the value of thelongituderecord component.- Returns:
- the value of the
longituderecord component
-
power
Returns the value of thepowerrecord component.- Returns:
- the value of the
powerrecord component
-
shift_state
Returns the value of theshift_staterecord component.- Returns:
- the value of the
shift_staterecord component
-
speed
Returns the value of thespeedrecord component.- Returns:
- the value of the
speedrecord component
-
timestamp
Returns the value of thetimestamprecord component.- Returns:
- the value of the
timestamprecord component
-