Package org.gvsig.fmap.dal.feature
Interface FeatureRules
- All Superinterfaces:
Iterable<FeatureRule>,org.gvsig.tools.persistence.Persistent
This is a container for FeatureRules.
Besides getting a rule by index, this structure allows
adding a rule, removing a rule, iterating over the rules and copying
the whole structure.
-
Method Summary
Modifier and TypeMethodDescriptionbooleanadd(String name, String description, boolean checkAtUpdate, boolean checkAtFinishEdition, org.gvsig.expressionevaluator.Expression expression) booleanadd(FeatureRule rule) Adds a new rule to this FeatureRules.voidclear()Clears this FeatureRules from any rules.get(int index) Returns an object given its index.getCopy()Returns a new copy of this FeatureRules.getRule(int index) Returns aFeatureRulegiven its index.booleanisEmpty()iterator()Returns an iterator over the availableFeatureRule(s)remove(int index) Removes the rule stored in the given index.booleanremove(FeatureRule rule) Removes the given rule from this FeatureRules.intsize()Returns the number of rules contained in this FeatureRules.Methods inherited from interface java.lang.Iterable
forEach, spliteratorMethods inherited from interface org.gvsig.tools.persistence.Persistent
loadFromState, saveToState
-
Method Details
-
get
Returns an object given its index.- Parameters:
index- a position in thisFeatureRules- Returns:
- the object found in the given index
-
getRule
Returns aFeatureRulegiven its index.- Parameters:
index- a position in thisFeatureRules- Returns:
- the
FeatureRulefound in the given index
-
add
Adds a new rule to this FeatureRules.- Parameters:
rule- the new rule to add.- Returns:
-
add
-
size
int size()Returns the number of rules contained in this FeatureRules.- Returns:
- number of rules in this FeatureRules
-
isEmpty
boolean isEmpty() -
clear
void clear()Clears this FeatureRules from any rules. -
remove
Removes the rule stored in the given index.- Parameters:
index- index of the rule to remove.- Returns:
- returns the removed rule
-
remove
Removes the given rule from this FeatureRules.- Parameters:
rule- FeatureRule to remove- Returns:
- true indicates success, false indicates that it was not found.
-
iterator
Iterator<FeatureRule> iterator()Returns an iterator over the availableFeatureRule(s)- Specified by:
iteratorin interfaceIterable<FeatureRule>- Returns:
- an iterator over the available
FeatureRule(s)
-
getCopy
FeatureRules getCopy()Returns a new copy of this FeatureRules.- Returns:
- a new copy of this FeatureRules.
-