Class SubstringFilter
- java.lang.Object
-
- org.apache.directory.ldap.client.api.search.AbstractFilter
-
- org.apache.directory.ldap.client.api.search.SubstringFilter
-
- All Implemented Interfaces:
Filter
final class SubstringFilter extends AbstractFilter
A class used to manage Substring Filters.- Author:
- Apache Directory Project
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description StringBuilderbuild(StringBuilder builder)Constructs a String representation of a Filterstatic SubstringFiltercontains(String attribute, String... parts)Create a SubstringFilter based on the filter elements.static SubstringFilterendsWith(String attribute, String... parts)Create a SubstringFilter based on the filter elements.static SubstringFilterstartsWith(String attribute, String... parts)Create a SubstringFilter based on the filter elements.static SubstringFiltersubstring(String attribute, String... parts)Create a SubstringFilter based on the filter elements.-
Methods inherited from class org.apache.directory.ldap.client.api.search.AbstractFilter
build
-
-
-
-
Method Detail
-
startsWith
public static SubstringFilter startsWith(String attribute, String... parts)
Create a SubstringFilter based on the filter elements. Such a filter has a form like Attribute=initial*([any]*)*. We don't expect any final String.- Parameters:
attribute- The AttributeType for this filterparts- The parts that are the initial string and zero to N any strings- Returns:
- An instance of a SubstringFilter
-
endsWith
public static SubstringFilter endsWith(String attribute, String... parts)
Create a SubstringFilter based on the filter elements. Such a filter has a form like Attribute=*([any]*)*final. We don't expect any initial String.- Parameters:
attribute- The AttributeType for this filterparts- The parts that are zero to N any strings followed by a final string- Returns:
- An instance of a SubstringFilter
-
contains
public static SubstringFilter contains(String attribute, String... parts)
Create a SubstringFilter based on the filter elements. Such a filter has a form like Attribute=*([any]*)*. We don't expect any initialor final Strings.- Parameters:
attribute- The AttributeType for this filterparts- The parts that are zero to N any strings with no initial nor final Strings- Returns:
- An instance of a SubstringFilter
-
substring
public static SubstringFilter substring(String attribute, String... parts)
Create a SubstringFilter based on the filter elements. Such a filter has a form like Attribute=initial*([any]*)*final.- Parameters:
attribute- The AttributeType for this filterparts- The parts that are zero to N any strings starting with an initial String and followed by a final string- Returns:
- An instance of a SubstringFilter
-
build
public StringBuilder build(StringBuilder builder)
Constructs a String representation of a Filter- Parameters:
builder- The current buffer containing the on going representation of the filter- Returns:
- The constructed String
-
-