java.lang.Object
java.lang.Record
it.auties.whatsapp.model.companion.CompanionDevice
- Record Components:
model- the non-null model of the devicemanufacturer- the non-null manufacturer of the deviceplatform- the non-null os of the deviceversion- the non-null os version of the device
public record CompanionDevice(String model, String manufacturer, UserAgent.PlatformType platform, String version)
extends Record
A model for a mobile companion
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final StringThe field for themanufacturerrecord component.private final StringThe field for themodelrecord component.private final UserAgent.PlatformTypeThe field for theplatformrecord component.private final StringThe field for theversionrecord component. -
Constructor Summary
ConstructorsConstructorDescriptionCompanionDevice(String model, String manufacturer, UserAgent.PlatformType platform, String version) Creates an instance of aCompanionDevicerecord class. -
Method Summary
Modifier and TypeMethodDescriptionstatic CompanionDeviceandroid(boolean business) private Stringprivate Stringfinal booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.static CompanionDeviceios(boolean business) static CompanionDevicekaiOs()Returns the value of themanufacturerrecord component.model()Returns the value of themodelrecord component.platform()Returns the value of theplatformrecord component.private Stringfinal StringtoString()Returns a string representation of this record class.toUserAgent(Version appVersion) version()Returns the value of theversionrecord component.static CompanionDeviceweb()
-
Field Details
-
model
The field for themodelrecord component. -
manufacturer
The field for themanufacturerrecord component. -
platform
The field for theplatformrecord component. -
version
The field for theversionrecord component.
-
-
Constructor Details
-
CompanionDevice
public CompanionDevice(String model, String manufacturer, UserAgent.PlatformType platform, String version) Creates an instance of aCompanionDevicerecord class.- Parameters:
model- the value for themodelrecord componentmanufacturer- the value for themanufacturerrecord componentplatform- the value for theplatformrecord componentversion- the value for theversionrecord component
-
-
Method Details
-
web
-
ios
-
android
-
kaiOs
-
toUserAgent
-
deviceVersion
-
deviceName
-
platformName
-
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). -
model
Returns the value of themodelrecord component.- Returns:
- the value of the
modelrecord component
-
manufacturer
Returns the value of themanufacturerrecord component.- Returns:
- the value of the
manufacturerrecord component
-
platform
Returns the value of theplatformrecord component.- Returns:
- the value of the
platformrecord component
-
version
Returns the value of theversionrecord component.- Returns:
- the value of the
versionrecord component
-