1 package org.xvsm.selectors;
2
3 import java.io.Serializable;
4 import java.util.Properties;
5
6 /***
7 * An abstract class which every selector extends.
8 *
9 * @author Christian Schreiber, Michael Proestler
10 *
11 */
12 public abstract class Selector implements Serializable {
13
14 /***
15 * Constant representing count all.
16 */
17 public static final int CNT_ALL = -1;
18
19 /***
20 * The amount of entries that should match.
21 */
22 private int count;
23
24 /***
25 * The default constructor.
26 *
27 */
28 public Selector() {
29
30 }
31
32 /***
33 * Constructor taking the amount of entries that should match.
34 *
35 * @param count
36 * the amount of entries that should match.
37 */
38 public Selector(int count) {
39 this.count = count;
40 }
41
42 /***
43 * Get the amount of entries that should match.
44 *
45 * @return the amount of entries that should match.
46 */
47 public int getCount() {
48 return count;
49 }
50
51 /***
52 * Set the amount of entries that should match.
53 *
54 * @param count
55 * The amount of entries that should match.
56 */
57 public void setCount(int count) {
58 this.count = count;
59 }
60
61 /***
62 * Sets the properties of this Selector.
63 *
64 * @param properties
65 * the properties
66 */
67 public abstract void setProperties(Properties properties);
68
69 /***
70 * Get the properties of this Selector. If the Selector does not have
71 * properties <code>null</code> or an empty properties object can be
72 * returned.
73 *
74 * @return
75 */
76 public abstract Properties getProperties();
77
78 }