net.groboclown.xml.xdstates.v1.impl
Class SetX

java.lang.Object
  |
  +--net.groboclown.xml.xdstates.v1.impl.SetX
All Implemented Interfaces:
IItem, ISet
Direct Known Subclasses:
MacroBuilder.MacroSet, MacroBuilder.MNodeSet, XmlStatesBuilder.XmlStatesSet

public class SetX
extends Object
implements ISet

An interface that contains all the data associated with a Set in the tree.

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

Field Summary
private  IAttribute[] attr
           
private  boolean didntFire
           
private  boolean doFireForEachIteration
           
private  IItem[] kids
           
private  ISet parent
           
private  SetStore store
           
 
Constructor Summary
SetX(IAttribute[] attr)
           
SetX(IAttribute[] attr, boolean _doFireForEachIteration)
           
SetX(IAttribute[] attr, IItem[] kids)
           
SetX(IAttribute[] attr, IItem[] kids, boolean _doFireForEachIteration)
           
 
Method Summary
 void addAttributes(IAttribute[] attribs)
           
 ISet copy(ISet newParent)
           
 boolean doFireForEachIteration()
           
 IDataList fire(IDataList list)
          Perform the firing on this node and all the sub nodes.
 IAttribute getAttribute(String name)
           
 IAttribute[] getAttributes()
           
 IItem[] getChildren()
           
 int getChildrenCount()
           
 ISet getParent()
           
 boolean hasNext()
          Determines if the set has another iteration.
 boolean hasParent()
           
 void setItems(IItem[] kids)
          Special method - used only during XML document loading
 void setParent(ISet parent)
           
 String toString()
           
 
Methods inherited from class java.lang.Object
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, registerNatives, wait, wait, wait
 

Field Detail

attr

private IAttribute[] attr

kids

private IItem[] kids

parent

private ISet parent

store

private SetStore store

didntFire

private boolean didntFire

doFireForEachIteration

private boolean doFireForEachIteration
Constructor Detail

SetX

public SetX(IAttribute[] attr,
            IItem[] kids)

SetX

public SetX(IAttribute[] attr,
            IItem[] kids,
            boolean _doFireForEachIteration)

SetX

public SetX(IAttribute[] attr)

SetX

public SetX(IAttribute[] attr,
            boolean _doFireForEachIteration)
Method Detail

setParent

public void setParent(ISet parent)

setItems

public void setItems(IItem[] kids)
Special method - used only during XML document loading

addAttributes

public void addAttributes(IAttribute[] attribs)

getAttributes

public IAttribute[] getAttributes()
Specified by:
getAttributes in interface ISet

getAttribute

public IAttribute getAttribute(String name)
Specified by:
getAttribute in interface ISet

getParent

public ISet getParent()
Specified by:
getParent in interface ISet

getChildren

public IItem[] getChildren()
Specified by:
getChildren in interface ISet

hasParent

public boolean hasParent()
Specified by:
hasParent in interface ISet

getChildrenCount

public int getChildrenCount()
Specified by:
getChildrenCount in interface ISet

copy

public ISet copy(ISet newParent)
Specified by:
copy in interface ISet

fire

public IDataList fire(IDataList list)
Perform the firing on this node and all the sub nodes. The given list does not contain any items.
Specified by:
fire in interface ISet

doFireForEachIteration

public boolean doFireForEachIteration()
Specified by:
doFireForEachIteration in interface ISet
Returns:
true if this set should fire at every iteration, regardless of its hasNext state.

hasNext

public boolean hasNext()
Description copied from interface: ISet
Determines if the set has another iteration. See the other classes for how the rules for this are determined.
Specified by:
hasNext in interface ISet

toString

public String toString()
Specified by:
toString in interface IItem
Overrides:
toString in class Object


Written under the LGPL