public final class PiHeaderFieldId extends Identifier<String>
identifier| Modifier and Type | Method and Description |
|---|---|
String |
fieldName()
Returns the name of the field.
|
String |
headerName()
Returns the name of the header.
|
int |
index()
Returns the index of this header.
|
static PiHeaderFieldId |
of(String headerName,
String fieldName)
Returns an header field identifier for the given header name and field name.
|
static PiHeaderFieldId |
of(String headerName,
String fieldName,
int index)
Returns an header field identifier for the given header name, field name and index.
|
equals, hashCode, id, toStringpublic static PiHeaderFieldId of(String headerName, String fieldName, int index)
Index represents the position of this header in the packet w.r.t. to other headers of the same type. Index 0 points to the first instance of the header, 1 the second one, etc. Helpful when dealing with stacked headers, e.g. to match on the second MPLS label.
headerName - header namefieldName - field nameindex - indexpublic static PiHeaderFieldId of(String headerName, String fieldName)
headerName - header namefieldName - field namepublic String headerName()
public String fieldName()
public int index()