Record Class ParsedAssociations
java.lang.Object
java.lang.Record
io.confluent.kafka.odyssey.ParsedAssociations
public record ParsedAssociations(Optional<AssociationConfig> key, Optional<AssociationConfig> value)
extends Record
Holds parsed association configurations for key and value.
-
Constructor Summary
ConstructorsConstructorDescriptionParsedAssociations(Optional<AssociationConfig> key, Optional<AssociationConfig> value) Creates an instance of aParsedAssociationsrecord class. -
Method Summary
Modifier and TypeMethodDescriptionstatic ParsedAssociationsempty()Creates an empty ParsedAssociations with no key or value.final booleanIndicates whether some other object is "equal to" this one.booleanReturns true if at least one association is present.final inthashCode()Returns a hash code value for this object.booleanisEmpty()Returns true if neither key nor value association is present.key()Returns the value of thekeyrecord component.toList()Returns associations as a list for SR API compatibility.final StringtoString()Returns a string representation of this record class.value()Returns the value of thevaluerecord component.
-
Constructor Details
-
ParsedAssociations
Creates an instance of aParsedAssociationsrecord class.- Parameters:
key- the value for thekeyrecord componentvalue- the value for thevaluerecord component
-
-
Method Details
-
isEmpty
public boolean isEmpty()Returns true if neither key nor value association is present. -
hasAssociations
public boolean hasAssociations()Returns true if at least one association is present. -
toList
Returns associations as a list for SR API compatibility. The list contains 0-2 elements depending on which associations are present. -
empty
Creates an empty ParsedAssociations with no key or value. -
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). -
key
Returns the value of thekeyrecord component.- Returns:
- the value of the
keyrecord component
-
value
Returns the value of thevaluerecord component.- Returns:
- the value of the
valuerecord component
-