net.groboclown.xml.xdstates.v1
Interface IValueModule

All Known Subinterfaces:
IPermuteValueModule
All Known Implementing Classes:
AbstractVSort

public interface IValueModule

A module that is associated with a value in a particular Attribute.

Version:
Alpha 0.9.0 - JDK 1.0+
Author:
Matt Albrecht

Method Summary
 boolean checkValue(String value)
           
 IValueModule copy()
           
 IDataList fire(String value, IDataList orig)
          Fire the module.
 boolean shouldFireTreeParse(String value, IDataList list)
          Used to determine the owning IAttributeModule's return value from the method with the same name.
 

Method Detail

copy

public IValueModule copy()

checkValue

public boolean checkValue(String value)
Returns:
true if the given value is OK for firing in this module.

shouldFireTreeParse

public boolean shouldFireTreeParse(String value,
                                   IDataList list)
Used to determine the owning IAttributeModule's return value from the method with the same name.

Determines if the tree at the node in the list should be fired. At the point this is called, the list contains no IItems. If any attribute returns false, then the tree and its sub-nodes are not fired. However, if all the attributes return true from this method, then the tree and its sub-nodes are fired.

This is useful for performing conditional branching on a tree to prevent the sub-nodes for executing any actions which may be undesired (such as property adjustments).


fire

public IDataList fire(String value,
                      IDataList orig)
Fire the module.
Returns:
the new list of data, or null if there is no change.


Written under the LGPL