java.lang.Object
java.lang.Record
it.auties.whatsapp.model.companion.CompanionProperty
- Record Components:
name
- the name of the propertycode
- an id that represents the propertyvalue
- the value associated with this propertydefaultValue
- the default value for this property
public record CompanionProperty(String name, double code, Object value, Object defaultValue)
extends Record
A model that represents an immutable property associated with the linked device
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionCompanionProperty
(String name, double code, Object value, Object defaultValue) Creates an instance of aCompanionProperty
record class. -
Method Summary
Modifier and TypeMethodDescriptiondouble
code()
Returns the value of thecode
record component.Returns the value of thedefaultValue
record component.final boolean
Indicates whether some other object is "equal to" this one.final int
hashCode()
Returns a hash code value for this object.name()
Returns the value of thename
record component.final String
toString()
Returns a string representation of this record class.value()
Returns the value of thevalue
record component.
-
Field Details
-
name
The field for thename
record component. -
code
private final double codeThe field for thecode
record component. -
value
The field for thevalue
record component. -
defaultValue
The field for thedefaultValue
record component.
-
-
Constructor Details
-
CompanionProperty
Creates an instance of aCompanionProperty
record class.- Parameters:
name
- the value for thename
record componentcode
- the value for thecode
record componentvalue
- the value for thevalue
record componentdefaultValue
- the value for thedefaultValue
record 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. Reference components are compared withObjects::equals(Object,Object)
; primitive components are compared with '=='. -
name
Returns the value of thename
record component.- Returns:
- the value of the
name
record component
-
code
public double code()Returns the value of thecode
record component.- Returns:
- the value of the
code
record component
-
value
Returns the value of thevalue
record component.- Returns:
- the value of the
value
record component
-
defaultValue
Returns the value of thedefaultValue
record component.- Returns:
- the value of the
defaultValue
record component
-