Class PiCriterion.Builder

  • Enclosing class:
    PiCriterion

    @Beta
    public static final class PiCriterion.Builder
    extends Object
    PiCriterion Builder.
    • Method Detail

      • matchExact

        public PiCriterion.Builder matchExact​(PiMatchFieldId fieldId,
                                              short value)
        Adds an exact field match for the given fieldId and value.
        Parameters:
        fieldId - protocol-independent header field Id
        value - exact match value
        Returns:
        this
      • matchExact

        public PiCriterion.Builder matchExact​(PiMatchFieldId fieldId,
                                              int value)
        Adds an exact field match for the given fieldId and value.
        Parameters:
        fieldId - protocol-independent header field Id
        value - exact match value
        Returns:
        this
      • matchExact

        public PiCriterion.Builder matchExact​(PiMatchFieldId fieldId,
                                              long value)
        Adds an exact field match for the given fieldId and value.
        Parameters:
        fieldId - protocol-independent header field Id
        value - exact match value
        Returns:
        this
      • matchExact

        public PiCriterion.Builder matchExact​(PiMatchFieldId fieldId,
                                              byte[] value)
        Adds an exact field match for the given fieldId and value.
        Parameters:
        fieldId - protocol-independent header field Id
        value - exact match value
        Returns:
        this
      • matchTernary

        public PiCriterion.Builder matchTernary​(PiMatchFieldId fieldId,
                                                short value,
                                                short mask)
        Adds a ternary field match for the given fieldId, value and mask.
        Parameters:
        fieldId - protocol-independent header field Id
        value - ternary match value
        mask - ternary match mask
        Returns:
        this
      • matchTernary

        public PiCriterion.Builder matchTernary​(PiMatchFieldId fieldId,
                                                int value,
                                                int mask)
        Adds a ternary field match for the given fieldId, value and mask.
        Parameters:
        fieldId - protocol-independent header field Id
        value - ternary match value
        mask - ternary match mask
        Returns:
        this
      • matchTernary

        public PiCriterion.Builder matchTernary​(PiMatchFieldId fieldId,
                                                long value,
                                                long mask)
        Adds a ternary field match for the given fieldId, value and mask.
        Parameters:
        fieldId - protocol-independent header field Id
        value - ternary match value
        mask - ternary match mask
        Returns:
        this
      • matchTernary

        public PiCriterion.Builder matchTernary​(PiMatchFieldId fieldId,
                                                byte[] value,
                                                byte[] mask)
        Adds a ternary field match for the given fieldId, value and mask.
        Parameters:
        fieldId - protocol-independent header field Id
        value - ternary match value
        mask - ternary match mask
        Returns:
        this
      • matchLpm

        public PiCriterion.Builder matchLpm​(PiMatchFieldId fieldId,
                                            short value,
                                            int prefixLength)
        Adds a longest-prefix field match for the given fieldId, value and prefix length.
        Parameters:
        fieldId - protocol-independent header field Id
        value - lpm match value
        prefixLength - lpm match prefix length
        Returns:
        this
      • matchLpm

        public PiCriterion.Builder matchLpm​(PiMatchFieldId fieldId,
                                            int value,
                                            int prefixLength)
        Adds a longest-prefix field match for the given fieldId, value and prefix length.
        Parameters:
        fieldId - protocol-independent header field Id
        value - lpm match value
        prefixLength - lpm match prefix length
        Returns:
        this
      • matchLpm

        public PiCriterion.Builder matchLpm​(PiMatchFieldId fieldId,
                                            long value,
                                            int prefixLength)
        Adds a longest-prefix field match for the given fieldId, value and prefix length.
        Parameters:
        fieldId - protocol-independent header field Id
        value - lpm match value
        prefixLength - lpm match prefix length
        Returns:
        this
      • matchLpm

        public PiCriterion.Builder matchLpm​(PiMatchFieldId fieldId,
                                            byte[] value,
                                            int prefixLength)
        Adds a longest-prefix field match for the given fieldId, value and prefix length.
        Parameters:
        fieldId - protocol-independent header field Id
        value - lpm match value
        prefixLength - lpm match prefix length
        Returns:
        this
      • matchRange

        public PiCriterion.Builder matchRange​(PiMatchFieldId fieldId,
                                              short low,
                                              short high)
        Adds a range field match for the given fieldId, low and high.
        Parameters:
        fieldId - protocol-independent header field Id
        low - range match low value
        high - range match high value
        Returns:
        this
      • matchRange

        public PiCriterion.Builder matchRange​(PiMatchFieldId fieldId,
                                              int low,
                                              int high)
        Adds a range field match for the given fieldId, low and high.
        Parameters:
        fieldId - protocol-independent header field Id
        low - range match low value
        high - range match high value
        Returns:
        this
      • matchRange

        public PiCriterion.Builder matchRange​(PiMatchFieldId fieldId,
                                              long low,
                                              long high)
        Adds a range field match for the given fieldId, low and high.
        Parameters:
        fieldId - protocol-independent header field Id
        low - range match low value
        high - range match high value
        Returns:
        this
      • matchRange

        public PiCriterion.Builder matchRange​(PiMatchFieldId fieldId,
                                              byte[] low,
                                              byte[] high)
        Adds a range field match for the given fieldId, low and high.
        Parameters:
        fieldId - protocol-independent header field Id
        low - range match low value
        high - range match high value
        Returns:
        this
      • build

        public PiCriterion build()
        Builds a PiCriterion.
        Returns:
        PiCriterion