Class ContractWithKey<Id,​Data,​Key>

  • Type Parameters:
    Id - The generated contract ID class alongside the generated Contract class.
    Data - The containing template's associated record type.
    Key - The template's key type.
    All Implemented Interfaces:
    Contract

    public abstract class ContractWithKey<Id,​Data,​Key>
    extends Contract<Id,​Data>
    A superclass for all codegen-generated Contracts whose templates have a key defined.
    • Field Detail

      • key

        public final java.util.Optional<Key> key
        The contract's key, if it was present in the event.
    • Method Detail

      • equals

        public final boolean equals​(java.lang.Object object)
        Overrides:
        equals in class Contract<Id,​Data>
      • keyToJson

        public java.lang.String keyToJson()