Package org.ldaptive.filter
Class SubstringFilter
- java.lang.Object
-
- org.ldaptive.filter.SubstringFilter
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classSubstringFilter.SubstringsType of substring match.-
Nested classes/interfaces inherited from interface org.ldaptive.filter.Filter
Filter.Type
-
-
Field Summary
Fields Modifier and Type Field Description private StringattributeDescAttribute description.private static intHASH_CODE_SEEDhash code seed.private byte[][]subAnySubstring any .private byte[]subFinalSubstring final.private byte[]subInitialSubstring initial.
-
Constructor Summary
Constructors Constructor Description SubstringFilter(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
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(Object o)private intgetAssertionCount()Returns the number of assertions in this substring filter.StringgetAttributeDesc()Returns the attribute description.DEREncodergetEncoder()Returns the encoder for this filter.byte[][]getSubAny()Returns the any substring assertion.byte[]getSubFinal()Returns the final substring assertion.byte[]getSubInitial()Returns the initial substring assertion.inthashCode()StringtoString()
-
-
-
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 descriptionstartsWith- substring initialendsWith- substring finalcontains- substring any
-
SubstringFilter
public SubstringFilter(String name, byte[] startsWith, byte[] endsWith, byte[]... contains)
Creates a new substring filter.- Parameters:
name- attribute descriptionstartsWith- substring initialendsWith- substring finalcontains- 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:FilterReturns the encoder for this filter.- Specified by:
getEncoderin interfaceFilter- Returns:
- DER encoder
-
-