1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17 package net.sf.ldaptemplate.support.filter;
18
19
20 /***
21 * A filter for equals. E.g.
22 *
23 * <pre>
24 * EqualsFilter filter = new EqualsFilter("cn", "Some CN");
25 * System.out.println(filter.ecode());
26 * </pre>
27 *
28 * would resut in: <code>(cn=Some CN)</code>
29 *
30 * @author Adam Skogman
31 */
32 public class EqualsFilter extends CompareFilter {
33
34 private static final String EQUALS_SIGN = "=";
35
36 public EqualsFilter(String attribute, String value) {
37 super(attribute, value);
38 }
39
40 /***
41 * Convenience constructor for int values.
42 *
43 * @param attribute
44 * @param value
45 */
46 public EqualsFilter(String attribute, int value) {
47 super(attribute, value);
48 }
49
50 protected String getCompareString() {
51 return EQUALS_SIGN;
52 }
53
54 }