DeviceImpl

class DeviceImpl(parsedDevice: Device) : Device

Implements the Device interface, providing the device model, type, and vendor information.

This class extracts the model, type, and vendor from the provided com.tecknobit.kinfo.model.Device object, ensuring null-safe values are used via the safeValue() method from the WebInfoItem interface.

Author

N7ghtm4r3

Parameters

parsedDevice

The Device object containing the parsed device information, used to extract the model, type, and vendor.

See also

Constructors

Link copied to clipboard
constructor(parsedDevice: Device)

Properties

Link copied to clipboard
open override val model: String

model The model of the device (e.g., iPhone 12, Galaxy S21). This value is safely extracted from the provided parsedDevice object.

Link copied to clipboard
open override val type: String

type The type of the device (e.g., smartphone, tablet, laptop). This value is safely extracted from the provided parsedDevice object.

Link copied to clipboard
open override val vendor: String

vendor The vendor of the device (e.g., Apple, Samsung, Lenovo). This value is safely extracted from the provided parsedDevice object.

Functions

Link copied to clipboard
open fun String?.safeValue(): String

Method to use a null-safe value.