|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--net.groboclown.xml.xdstates.v1.modules.ADefault
This module only contains IValueModule elements, and passes the control over to them. Useful for registering collections of value modules with a similar functionality, such as sorting techniques.
This reports a single state - it will always return false from
hasAnotherState()
.
As for delegating calls to the value modules, only the first value module
that returns true from IValueModule.checkValue( String )
will be delegated to.
The determination for firing the tree will be delegated to the underlying value modules. The first value module that checks OK will have its return value returned. If no value modules check OK, then true is returned.
Field Summary | |
private boolean |
hasMore
|
private Vector |
valueModules
|
Constructor Summary | |
ADefault()
|
Method Summary | |
IAttributeModule |
copy()
Copy the current module, and reset the new module's state as if fire( String, IDataList ) has never been called. |
protected IValueModule |
findOkModule(String value)
Find the first module that returns true from IValueModule.checkValue( String ) . |
IDataList |
fire(String value,
IDataList list)
Perform the specific permutation of the given data list. |
boolean |
hasAnotherState()
The containing application will ensure that this will only be called after each fire( String, IDataList ) call. |
void |
registerValueModule(IValueModule module)
Register the given value module with this module. |
boolean |
shouldFireTreeParse(String value,
IDataList list)
Determines if the tree at the node in the list should be fired. |
Methods inherited from class java.lang.Object |
|
Field Detail |
private Vector valueModules
private boolean hasMore
Constructor Detail |
public ADefault()
Method Detail |
public void registerValueModule(IValueModule module)
registerValueModule
in interface IAttributeModule
public IAttributeModule copy()
fire( String, IDataList )
has never been called.copy
in interface IAttributeModule
public boolean hasAnotherState()
fire( String, IDataList )
call. The
fire( String, IDataList )
call should
store this result at the end of the fire( String, IDataList )
method.hasAnotherState
in interface IAttributeModule
fire( String, IDataList )
public boolean shouldFireTreeParse(String value, IDataList list)
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).
shouldFireTreeParse
in interface IAttributeModule
public IDataList fire(String value, IDataList list)
hasAnotherState()
at the end of this method.fire
in interface IAttributeModule
protected IValueModule findOkModule(String value)
IValueModule.checkValue( String )
. If none are found,
returns null.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |