Module it.auties.cobalt
Record Class HighlyStructuredCurrency
java.lang.Object
java.lang.Record
it.auties.whatsapp.model.button.template.highlyStructured.HighlyStructuredCurrency
- All Implemented Interfaces:
it.auties.protobuf.model.ProtobufMessage,it.auties.protobuf.model.ProtobufObject,HighlyStructuredLocalizableParameterValue
public record HighlyStructuredCurrency(String currencyCode, long amount1000)
extends Record
implements HighlyStructuredLocalizableParameterValue
A model class that represents a currency
-
Nested Class Summary
Nested classes/interfaces inherited from interface it.auties.whatsapp.model.button.template.highlyStructured.HighlyStructuredLocalizableParameterValue
HighlyStructuredLocalizableParameterValue.Type -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final longThe field for theamount1000record component.private final StringThe field for thecurrencyCoderecord component. -
Constructor Summary
ConstructorsConstructorDescriptionHighlyStructuredCurrency(String currencyCode, long amount1000) Creates an instance of aHighlyStructuredCurrencyrecord class. -
Method Summary
Modifier and TypeMethodDescriptionlongReturns the value of theamount1000record component.Returns the value of thecurrencyCoderecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.Returns the type of parameterfinal StringtoString()Returns a string representation of this record class.
-
Field Details
-
currencyCode
The field for thecurrencyCoderecord component. -
amount1000
private final long amount1000The field for theamount1000record component.
-
-
Constructor Details
-
HighlyStructuredCurrency
Creates an instance of aHighlyStructuredCurrencyrecord class.- Parameters:
currencyCode- the value for thecurrencyCoderecord componentamount1000- the value for theamount1000record component
-
-
Method Details
-
parameterType
Description copied from interface:HighlyStructuredLocalizableParameterValueReturns the type of parameter- Specified by:
parameterTypein interfaceHighlyStructuredLocalizableParameterValue- Returns:
- a non-null type
-
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 '=='. -
currencyCode
Returns the value of thecurrencyCoderecord component.- Returns:
- the value of the
currencyCoderecord component
-
amount1000
public long amount1000()Returns the value of theamount1000record component.- Returns:
- the value of the
amount1000record component
-