WeightPayload

data class WeightPayload(val weight: Double, val measurementTime: Long, val id: Long? = null, val lastUpdate: Long? = null, val isDeleted: Boolean = false, val source: Source = Source.UNKNOWN) : HDWeight

Constructors

Link copied to clipboard
fun WeightPayload(weight: Double, measurementTime: Long, id: Long? = null, lastUpdate: Long? = null, isDeleted: Boolean = false, source: Source = Source.UNKNOWN)

Properties

Link copied to clipboard
open override val id: Long? = null

Unique identifier of entity. It is null until synchronization with the server.

Link copied to clipboard
open override val isDeleted: Boolean = false

true if this entity has been deleted and false otherwise.

Link copied to clipboard
open override val lastUpdate: Long? = null

Timestamp in milliseconds of last changes of this entity on the server.

Link copied to clipboard
open override val measurementTime: Long

Time when data was measured as UNIX timestamp.

Link copied to clipboard
open override val source: Source

Source of the data.

Link copied to clipboard
open override val weight: Double

User's weight in kilograms.

Functions

Link copied to clipboard
open override fun toString(): String

Inherited functions

Link copied to clipboard
open fun isEmpty(): Boolean

Check is object an empty (false) weight.

Link copied to clipboard
open fun isSame(other: HDWeight): Boolean

Returns true if weights are the same (i.e. have the same measurement time, weight and source) and false otherwise.