svn-gvsig-desktop / trunk / org.gvsig.desktop / org.gvsig.desktop.compat.cdc / org.gvsig.fmap.dal / org.gvsig.fmap.dal.api / src / main / java / org / gvsig / fmap / dal / feature / FeatureRules.java @ 40435
History | View | Annotate | Download (1.88 KB)
1 |
package org.gvsig.fmap.dal.feature; |
---|---|
2 |
|
3 |
import java.util.Iterator; |
4 |
|
5 |
/**
|
6 |
* This is a container for FeatureRules.
|
7 |
* Besides getting a rule by index, this structure allows
|
8 |
* adding a rule, removing a rule, iterating over the rules and copying
|
9 |
* the whole structure.
|
10 |
*
|
11 |
*/
|
12 |
public interface FeatureRules { |
13 |
|
14 |
/**
|
15 |
* Returns an object given its index.
|
16 |
*
|
17 |
* @param index
|
18 |
* a position in this <code>FeatureRules</code>
|
19 |
* @return
|
20 |
* the object found in the given index
|
21 |
*/
|
22 |
public Object get(int index); |
23 |
|
24 |
/**
|
25 |
* Returns a {@link FeatureRule} given its index.
|
26 |
*
|
27 |
* @param index
|
28 |
* a position in this <code>FeatureRules</code>
|
29 |
* @return
|
30 |
* the {@link FeatureRule} found in the given index
|
31 |
*/
|
32 |
|
33 |
public FeatureRule getRule(int index); |
34 |
|
35 |
/**
|
36 |
* Adds a new rule to this FeatureRules.
|
37 |
*
|
38 |
* @param rule
|
39 |
* the new rule to add.
|
40 |
* @return
|
41 |
* the added rule
|
42 |
*/
|
43 |
public FeatureRule add(FeatureRule rule);
|
44 |
|
45 |
/**
|
46 |
* Returns the number of rules contained in this FeatureRules.
|
47 |
*
|
48 |
* @return
|
49 |
* number of rules in this FeatureRules
|
50 |
*/
|
51 |
public int size(); |
52 |
|
53 |
/**
|
54 |
* Clears this FeatureRules from any rules.
|
55 |
*/
|
56 |
public void clear(); |
57 |
|
58 |
/**
|
59 |
* Removes the rule stored in the given index.
|
60 |
*
|
61 |
* @param index
|
62 |
* index of the rule to remove.
|
63 |
* @return
|
64 |
* returns the removed rule
|
65 |
*/
|
66 |
public Object remove(int index); |
67 |
|
68 |
/**
|
69 |
* Removes the given rule from this FeatureRules.
|
70 |
*
|
71 |
* @param rule
|
72 |
* FeatureRule to remove
|
73 |
* @return
|
74 |
* true indicates success, false indicates that it was not found.
|
75 |
*/
|
76 |
public boolean remove(FeatureRule rule); |
77 |
|
78 |
/**
|
79 |
* Returns an iterator over the available {@link FeatureRule}(s)
|
80 |
*
|
81 |
* @return
|
82 |
* an iterator over the available {@link FeatureRule}(s)
|
83 |
*/
|
84 |
public Iterator iterator(); |
85 |
|
86 |
/**
|
87 |
* Returns a new copy of this FeatureRules.
|
88 |
*
|
89 |
* @return
|
90 |
* a new copy of this FeatureRules.
|
91 |
*/
|
92 |
public FeatureRules getCopy();
|
93 |
|
94 |
} |