Record Class CAI1Metadata.Text
java.lang.Object
java.lang.Record
com.io7m.cardant.protocol.inventory.cb.CAI1Metadata.Text
- Record Components:
fieldKey- The metadata value key.fieldValue- The metadata value.
- All Implemented Interfaces:
CAI1Metadata,com.io7m.cedarbridge.runtime.api.CBSerializableType
- Enclosing interface:
CAI1Metadata
public static record CAI1Metadata.Text(CAI1TypeRecordFieldIdentifier fieldKey, com.io7m.cedarbridge.runtime.api.CBString fieldValue)
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
ConstructorsConstructorDescriptionText(CAI1TypeRecordFieldIdentifier fieldKey, com.io7m.cedarbridge.runtime.api.CBString fieldValue) Creates an instance of aTextrecord class. -
Method Summary
Modifier and TypeMethodDescriptionstatic CAI1Metadata.Textdeserialize(com.io7m.cedarbridge.runtime.api.CBSerializationContextType $context) Deserialize a value of type com.io7m.cardant.protocol.inventory.cb.Text.final booleanIndicates whether some other object is "equal to" this one.fieldKey()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.Text $x) Serialize a value of type com.io7m.cardant.protocol.inventory.cb.Text.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
Text
public Text(CAI1TypeRecordFieldIdentifier fieldKey, com.io7m.cedarbridge.runtime.api.CBString fieldValue) Creates an instance of aTextrecord class.- Parameters:
fieldKey- the value for thefieldKeyrecord componentfieldValue- the value for thefieldValuerecord component
-
-
Method Details
-
serialize
public static void serialize(com.io7m.cedarbridge.runtime.api.CBSerializationContextType $context, CAI1Metadata.Text $x) throws IOException Serialize a value of type com.io7m.cardant.protocol.inventory.cb.Text.- Parameters:
$context- The serialization context.$x- The value to be serialized.- Throws:
IOException
-
deserialize
public static CAI1Metadata.Text deserialize(com.io7m.cedarbridge.runtime.api.CBSerializationContextType $context) throws IOException Deserialize a value of type com.io7m.cardant.protocol.inventory.cb.Text.- Parameters:
$context- The serialization context.- Returns:
- A value of type com.io7m.cardant.protocol.inventory.cb.Text.
- Throws:
IOException
-
toString
-
hashCode
-
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
-
fieldValue
public com.io7m.cedarbridge.runtime.api.CBString fieldValue()Returns the value of thefieldValuerecord component.- Returns:
- the value of the
fieldValuerecord component
-