Class PiHeaderUnion

  • All Implemented Interfaces:
    PiData

    @Beta
    public final class PiHeaderUnion
    extends Object
    implements PiData
    PiHeaderUnion entity in a protocol-independent pipeline.
    • Method Detail

      • ofInvalid

        public static PiHeaderUnion ofInvalid()
        Returns a new invalid protocol-independent header union.
        Returns:
        header union
      • of

        public static PiHeaderUnion of​(String validHeaderName,
                                       PiHeader header)
        Returns a new valid protocol-independent header union.
        Parameters:
        validHeaderName - header name
        header - the header
        Returns:
        header union
      • isValid

        public boolean isValid()
        Returns true if this header is valid, false otherwise.
        Returns:
        a boolean value
      • headerName

        public String headerName()
        Return the header name.
        Returns:
        header name, return null if the header union invalid
      • header

        public PiHeader header()
        Return the header.
        Returns:
        header, return null if the header union invalid
      • type

        public PiData.Type type()
        Description copied from interface: PiData
        Returns the type of this protocol-independent data.
        Specified by:
        type in interface PiData
        Returns:
        the type of this instance
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object