Class GenericRecord<P>

  • All Implemented Interfaces:
    Record<P>
    Direct Known Subclasses:
    FileRecord, StringRecord

    public class GenericRecord<P>
    extends java.lang.Object
    implements Record<P>
    General purpose record implementation.
    Author:
    Mahmoud Ben Hassine (mahmoud.benhassine@icloud.com)
    • Field Detail

      • header

        protected Header header
      • payload

        protected P payload
    • Constructor Detail

      • GenericRecord

        public GenericRecord​(Header header,
                             P payload)
        Create a new GenericRecord.
        Parameters:
        header - the record header
        payload - the record payload
    • Method Detail

      • getHeader

        public Header getHeader()
        Description copied from interface: Record
        Return the record's header.
        Specified by:
        getHeader in interface Record<P>
        Returns:
        the record's header.
      • getPayload

        public P getPayload()
        Description copied from interface: Record
        Return the record's payload.
        Specified by:
        getPayload in interface Record<P>
        Returns:
        the record's payload.
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object