Class SubstringFilter

  • All Implemented Interfaces:
    Filter

    public class SubstringFilter
    extends Object
    implements Filter
    Substring search filter component defined as:
     (attributeDescription=attributeValueWithWildCard)
     
    • Field Detail

      • HASH_CODE_SEED

        private static final int HASH_CODE_SEED
        hash code seed.
        See Also:
        Constant Field Values
      • attributeDesc

        private final String attributeDesc
        Attribute description.
      • subInitial

        private final byte[] subInitial
        Substring initial.
      • subAny

        private final byte[][] subAny
        Substring any .
      • subFinal

        private final byte[] subFinal
        Substring final.
    • Constructor Detail

      • SubstringFilter

        public SubstringFilter​(String name,
                               String startsWith,
                               String endsWith,
                               String... contains)
        Creates a new substring filter.
        Parameters:
        name - attribute description
        startsWith - substring initial
        endsWith - substring final
        contains - substring any
      • SubstringFilter

        public SubstringFilter​(String name,
                               byte[] startsWith,
                               byte[] endsWith,
                               byte[]... contains)
        Creates a new substring filter.
        Parameters:
        name - attribute description
        startsWith - substring initial
        endsWith - substring final
        contains - substring any
    • Method Detail

      • getAttributeDesc

        public String getAttributeDesc()
        Returns the attribute description.
        Returns:
        attribute description
      • getSubInitial

        public byte[] getSubInitial()
        Returns the initial substring assertion.
        Returns:
        initial substring assertion
      • getSubAny

        public byte[][] getSubAny()
        Returns the any substring assertion.
        Returns:
        any substring assertion
      • getSubFinal

        public byte[] getSubFinal()
        Returns the final substring assertion.
        Returns:
        final substring assertion
      • getAssertionCount

        private int getAssertionCount()
        Returns the number of assertions in this substring filter.
        Returns:
        assertion count
      • getEncoder

        public DEREncoder getEncoder()
        Description copied from interface: Filter
        Returns the encoder for this filter.
        Specified by:
        getEncoder in interface Filter
        Returns:
        DER encoder
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object