Package org.ldaptive.filter
Class SubstringFilter
java.lang.Object
org.ldaptive.filter.SubstringFilter
- All Implemented Interfaces:
Filter
Substring search filter component defined as:
(attributeDescription=attributeValueWithWildCard)
-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from interface org.ldaptive.filter.Filter
Filter.Type
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final String
Attribute description.private static final int
hash code seed.private final byte[][]
Substring any .private final byte[]
Substring final.private final byte[]
Substring initial. -
Constructor Summary
ConstructorsConstructorDescriptionSubstringFilter
(String name, byte[] startsWith, byte[] endsWith, byte[]... contains) Creates a new substring filter.SubstringFilter
(String name, String startsWith, String endsWith, String... contains) Creates a new substring filter. -
Method Summary
Modifier and TypeMethodDescriptionboolean
private int
Returns the number of assertions in this substring filter.Returns the attribute description.Returns the encoder for this filter.byte[][]
Returns the any substring assertion.byte[]
Returns the final substring assertion.byte[]
Returns the initial substring assertion.int
hashCode()
toString()
-
Field Details
-
HASH_CODE_SEED
private static final int HASH_CODE_SEEDhash code seed.- See Also:
-
attributeDesc
Attribute description. -
subInitial
private final byte[] subInitialSubstring initial. -
subAny
private final byte[][] subAnySubstring any . -
subFinal
private final byte[] subFinalSubstring final.
-
-
Constructor Details
-
SubstringFilter
Creates a new substring filter.- Parameters:
name
- attribute descriptionstartsWith
- substring initialendsWith
- substring finalcontains
- substring any
-
SubstringFilter
Creates a new substring filter.- Parameters:
name
- attribute descriptionstartsWith
- substring initialendsWith
- substring finalcontains
- substring any
-
-
Method Details
-
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
Description copied from interface:Filter
Returns the encoder for this filter.- Specified by:
getEncoder
in interfaceFilter
- Returns:
- DER encoder
-
equals
-
hashCode
public int hashCode() -
toString
-