Class PiHeaderUnion
- java.lang.Object
-
- org.onosproject.net.pi.runtime.data.PiHeaderUnion
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.onosproject.net.pi.model.PiData
PiData.Type
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(Object o)
int
hashCode()
PiHeader
header()
Return the header.String
headerName()
Return the header name.boolean
isValid()
Returns true if this header is valid, false otherwise.static PiHeaderUnion
of(String validHeaderName, PiHeader header)
Returns a new valid protocol-independent header union.static PiHeaderUnion
ofInvalid()
Returns a new invalid protocol-independent header union.String
toString()
PiData.Type
type()
Returns the type of this protocol-independent data.
-
-
-
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 nameheader
- 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.
-
-