Package org.onosproject.net.pi.runtime
Class PiLpmFieldMatch
- java.lang.Object
-
- org.onosproject.net.pi.runtime.PiFieldMatch
-
- org.onosproject.net.pi.runtime.PiLpmFieldMatch
-
@Beta public final class PiLpmFieldMatch extends PiFieldMatch
Instance of a longest-prefix field match in a protocol-independent pipeline.
-
-
Constructor Summary
Constructors Constructor Description PiLpmFieldMatch(PiMatchFieldId fieldId, ImmutableByteSequence value, int prefixLength)
Creates a new LPM field match.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(Object o)
int
hashCode()
int
prefixLength()
Returns the prefix length to be matched.String
toString()
PiMatchType
type()
Returns the type of match to be performed.ImmutableByteSequence
value()
Returns the value matched by this field.-
Methods inherited from class org.onosproject.net.pi.runtime.PiFieldMatch
fieldId
-
-
-
-
Constructor Detail
-
PiLpmFieldMatch
public PiLpmFieldMatch(PiMatchFieldId fieldId, ImmutableByteSequence value, int prefixLength)
Creates a new LPM field match.- Parameters:
fieldId
- field identifiervalue
- valueprefixLength
- prefix length
-
-
Method Detail
-
type
public PiMatchType type()
Description copied from class:PiFieldMatch
Returns the type of match to be performed.- Specified by:
type
in classPiFieldMatch
- Returns:
- a match type value
-
value
public ImmutableByteSequence value()
Returns the value matched by this field.- Returns:
- a byte sequence value
-
prefixLength
public int prefixLength()
Returns the prefix length to be matched.- Returns:
- an integer value
-
-