svn-gvsig-desktop / branches / v2_0_0_prep / libraries / libFMap_dal / src / org / gvsig / fmap / dal / feature / FeatureRules.java @ 37603
History | View | Annotate | Download (1.88 KB)
1 | 24496 | jmvivo | package org.gvsig.fmap.dal.feature; |
---|---|---|---|
2 | 23754 | jjdelcerro | |
3 | import java.util.Iterator; |
||
4 | |||
5 | 24789 | jiyarza | /**
|
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 | 23754 | jjdelcerro | public interface FeatureRules { |
13 | |||
14 | 24789 | jiyarza | /**
|
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 | 23754 | jjdelcerro | public Object get(int index); |
23 | |||
24 | 24789 | jiyarza | /**
|
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 | 24844 | jiyarza | |
33 | 23754 | jjdelcerro | public FeatureRule getRule(int index); |
34 | |||
35 | 24789 | jiyarza | /**
|
36 | 24844 | jiyarza | * Adds a new rule to this FeatureRules.
|
37 | 24789 | jiyarza | *
|
38 | * @param rule
|
||
39 | 24844 | jiyarza | * the new rule to add.
|
40 | 24789 | jiyarza | * @return
|
41 | 24844 | jiyarza | * the added rule
|
42 | 24789 | jiyarza | */
|
43 | 23754 | jjdelcerro | public FeatureRule add(FeatureRule rule);
|
44 | |||
45 | 24844 | jiyarza | /**
|
46 | * Returns the number of rules contained in this FeatureRules.
|
||
47 | *
|
||
48 | * @return
|
||
49 | * number of rules in this FeatureRules
|
||
50 | */
|
||
51 | 23754 | jjdelcerro | public int size(); |
52 | |||
53 | 24844 | jiyarza | /**
|
54 | * Clears this FeatureRules from any rules.
|
||
55 | */
|
||
56 | 23754 | jjdelcerro | public void clear(); |
57 | |||
58 | 24844 | jiyarza | /**
|
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 | 23754 | jjdelcerro | public Object remove(int index); |
67 | |||
68 | 24844 | jiyarza | /**
|
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 | 23754 | jjdelcerro | public boolean remove(FeatureRule rule); |
77 | |||
78 | 24844 | jiyarza | /**
|
79 | * Returns an iterator over the available {@link FeatureRule}(s)
|
||
80 | *
|
||
81 | * @return
|
||
82 | * an iterator over the available {@link FeatureRule}(s)
|
||
83 | */
|
||
84 | 23754 | jjdelcerro | public Iterator iterator(); |
85 | |||
86 | 24844 | jiyarza | /**
|
87 | * Returns a new copy of this FeatureRules.
|
||
88 | *
|
||
89 | * @return
|
||
90 | * a new copy of this FeatureRules.
|
||
91 | */
|
||
92 | 23754 | jjdelcerro | public FeatureRules getCopy();
|
93 | |||
94 | } |