Record Class CAI1Metadata.Monetary
java.lang.Object
java.lang.Record
com.io7m.cardant.protocol.inventory.cb.CAI1Metadata.Monetary
- Record Components:
fieldKey- The metadata value key.fieldValue- The metadata value.fieldCurrency- The metadata currency unit.
- All Implemented Interfaces:
CAI1Metadata,com.io7m.cedarbridge.runtime.api.CBSerializableType
- Enclosing interface:
CAI1Metadata
public static record CAI1Metadata.Monetary(com.io7m.cedarbridge.runtime.api.CBString fieldKey, com.io7m.cedarbridge.runtime.api.CBString fieldValue, com.io7m.cedarbridge.runtime.api.CBString fieldCurrency)
extends Record
implements com.io7m.cedarbridge.runtime.api.CBSerializableType, CAI1Metadata
-
Nested Class Summary
Nested classes/interfaces inherited from interface com.io7m.cardant.protocol.inventory.cb.CAI1Metadata
CAI1Metadata.Integral, CAI1Metadata.Monetary, CAI1Metadata.Real, CAI1Metadata.Text, CAI1Metadata.Time -
Constructor Summary
ConstructorsConstructorDescriptionMonetary(com.io7m.cedarbridge.runtime.api.CBString fieldKey, com.io7m.cedarbridge.runtime.api.CBString fieldValue, com.io7m.cedarbridge.runtime.api.CBString fieldCurrency) Creates an instance of aMonetaryrecord class. -
Method Summary
Modifier and TypeMethodDescriptionstatic CAI1Metadata.Monetarydeserialize(com.io7m.cedarbridge.runtime.api.CBSerializationContextType $context) Deserialize a value of type com.io7m.cardant.protocol.inventory.cb.Monetary.final booleanIndicates whether some other object is "equal to" this one.com.io7m.cedarbridge.runtime.api.CBStringReturns the value of thefieldCurrencyrecord component.com.io7m.cedarbridge.runtime.api.CBStringfieldKey()Returns the value of thefieldKeyrecord component.com.io7m.cedarbridge.runtime.api.CBStringReturns the value of thefieldValuerecord component.final inthashCode()Returns a hash code value for this object.static voidserialize(com.io7m.cedarbridge.runtime.api.CBSerializationContextType $context, CAI1Metadata.Monetary $x) Serialize a value of type com.io7m.cardant.protocol.inventory.cb.Monetary.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
Monetary
public Monetary(com.io7m.cedarbridge.runtime.api.CBString fieldKey, com.io7m.cedarbridge.runtime.api.CBString fieldValue, com.io7m.cedarbridge.runtime.api.CBString fieldCurrency) Creates an instance of aMonetaryrecord class.- Parameters:
fieldKey- the value for thefieldKeyrecord componentfieldValue- the value for thefieldValuerecord componentfieldCurrency- the value for thefieldCurrencyrecord component
-
-
Method Details
-
serialize
public static void serialize(com.io7m.cedarbridge.runtime.api.CBSerializationContextType $context, CAI1Metadata.Monetary $x) throws IOException Serialize a value of type com.io7m.cardant.protocol.inventory.cb.Monetary.- Parameters:
$context- The serialization context.$x- The value to be serialized.- Throws:
IOException
-
deserialize
public static CAI1Metadata.Monetary deserialize(com.io7m.cedarbridge.runtime.api.CBSerializationContextType $context) throws IOException Deserialize a value of type com.io7m.cardant.protocol.inventory.cb.Monetary.- Parameters:
$context- The serialization context.- Returns:
- A value of type com.io7m.cardant.protocol.inventory.cb.Monetary.
- Throws:
IOException
-
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). -
fieldKey
public com.io7m.cedarbridge.runtime.api.CBString fieldKey()Returns the value of thefieldKeyrecord component.- Returns:
- the value of the
fieldKeyrecord component
-
fieldValue
public com.io7m.cedarbridge.runtime.api.CBString fieldValue()Returns the value of thefieldValuerecord component.- Returns:
- the value of the
fieldValuerecord component
-
fieldCurrency
public com.io7m.cedarbridge.runtime.api.CBString fieldCurrency()Returns the value of thefieldCurrencyrecord component.- Returns:
- the value of the
fieldCurrencyrecord component
-