Interface FeatureRules

All Superinterfaces:
Iterable<FeatureRule>, org.gvsig.tools.persistence.Persistent

public interface FeatureRules extends 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 Type
    Method
    Description
    boolean
    add(String name, String description, boolean checkAtUpdate, boolean checkAtFinishEdition, org.gvsig.expressionevaluator.Expression expression)
     
    boolean
    Adds a new rule to this FeatureRules.
    void
    Clears this FeatureRules from any rules.
    get(int index)
    Returns an object given its index.
    Returns a new copy of this FeatureRules.
    getRule(int index)
    Returns a FeatureRule given its index.
    boolean
     
    Returns an iterator over the available FeatureRule(s)
    remove(int index)
    Removes the rule stored in the given index.
    boolean
    Removes the given rule from this FeatureRules.
    int
    Returns the number of rules contained in this FeatureRules.

    Methods inherited from interface java.lang.Iterable

    forEach, spliterator

    Methods inherited from interface org.gvsig.tools.persistence.Persistent

    loadFromState, saveToState
  • Method Details

    • get

      FeatureRule get(int index)
      Returns an object given its index.
      Parameters:
      index - a position in this FeatureRules
      Returns:
      the object found in the given index
    • getRule

      FeatureRule getRule(int index)
      Returns a FeatureRule given its index.
      Parameters:
      index - a position in this FeatureRules
      Returns:
      the FeatureRule found in the given index
    • add

      boolean add(FeatureRule rule)
      Adds a new rule to this FeatureRules.
      Parameters:
      rule - the new rule to add.
      Returns:
    • add

      boolean add(String name, String description, boolean checkAtUpdate, boolean checkAtFinishEdition, org.gvsig.expressionevaluator.Expression expression)
    • 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

      FeatureRule remove(int index)
      Removes the rule stored in the given index.
      Parameters:
      index - index of the rule to remove.
      Returns:
      returns the removed rule
    • remove

      boolean remove(FeatureRule rule)
      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 available FeatureRule(s)
      Specified by:
      iterator in interface Iterable<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.