|
||||||||||
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.AbstractVSelect
A generic value module that selects a subset of items from the underlying collection. The subclasses must getIndex(), setIndex(), and setHasMore() in its selection method.
Field Summary | |
private boolean |
hasMore
|
private int |
position
|
private static String[] |
values
|
Constructor Summary | |
AbstractVSelect(String[] values)
|
Method Summary | |
boolean |
checkValue(String value)
|
IValueModule |
copy()
|
protected abstract AbstractVSelect |
copyAbstractVSelect()
|
IDataList |
fire(String value,
IDataList orig)
Fire the module. |
protected int |
getIndex()
Returns the current index value. |
boolean |
hasAnotherState()
|
protected abstract void |
select(IItem[] in,
ArrayList out)
Load the given out list with the selected items from the in list, using the current getIndex(). |
protected void |
setHasMore(boolean hasMore)
Sets the return value of the hasAnotherState() method. |
protected void |
setIndex(int index)
Sets the index, which will be returned by each successive getIndex() call. |
boolean |
shouldFireTreeParse(String value,
IDataList list)
Used to determine the owning IAttributeModule 's return
value from the method with the same name. |
Methods inherited from class java.lang.Object |
|
Field Detail |
private static String[] values
private int position
private boolean hasMore
Constructor Detail |
public AbstractVSelect(String[] values)
Method Detail |
public final IValueModule copy()
copy
in interface IValueModule
protected abstract AbstractVSelect copyAbstractVSelect()
protected abstract void select(IItem[] in, ArrayList out)
If the in item list is empty, then this method will not be called.
protected final void setHasMore(boolean hasMore)
protected final int getIndex()
protected final void setIndex(int index)
public boolean hasAnotherState()
hasAnotherState
in interface IPermuteValueModule
IAttributeModule.hasAnotherState()
public boolean checkValue(String value)
checkValue
in interface IValueModule
public boolean shouldFireTreeParse(String value, IDataList list)
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).
shouldFireTreeParse
in interface IValueModule
public IDataList fire(String value, IDataList orig)
fire
in interface IValueModule
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |