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 aCompanionPropertyrecord class. -
Method Summary
Modifier and TypeMethodDescriptiondoublecode()Returns the value of thecoderecord component.Returns the value of thedefaultValuerecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.name()Returns the value of thenamerecord component.final StringtoString()Returns a string representation of this record class.value()Returns the value of thevaluerecord component.
-
Field Details
-
name
The field for thenamerecord component. -
code
private final double codeThe field for thecoderecord component. -
value
The field for thevaluerecord component. -
defaultValue
The field for thedefaultValuerecord component.
-
-
Constructor Details
-
CompanionProperty
Creates an instance of aCompanionPropertyrecord class.- Parameters:
name- the value for thenamerecord componentcode- the value for thecoderecord componentvalue- the value for thevaluerecord componentdefaultValue- the value for thedefaultValuerecord 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 thenamerecord component.- Returns:
- the value of the
namerecord component
-
code
public double code()Returns the value of thecoderecord component.- Returns:
- the value of the
coderecord component
-
value
Returns the value of thevaluerecord component.- Returns:
- the value of the
valuerecord component
-
defaultValue
Returns the value of thedefaultValuerecord component.- Returns:
- the value of the
defaultValuerecord component
-