Skip navigation links
xal.model

Interface IComposite

    • Method Detail

      • localIterator

        java.util.Iterator<IComponent> localIterator()
        Return iterator over direct descendants only of this composite element in sequence.
        Returns:
        interface to iterator object
        See Also:
        Iterator
      • globalIterator

        java.util.Iterator<IComponent> globalIterator()
        Returns iterator over all the components in this composite element in proper sequence. Parent objects should be returned first than all the children. This would be the order in which the probe visits each component.
        Returns:
        interface to iterator object
        See Also:
        Iterator, CompositeGlobalIterator
      • getChildCount

        int getChildCount()
        Return the number of direct descendants in this composite. That is, any child composite nodes only get a single count.
        Returns:
        number of direct child nodes
      • getChild

        IComponent getChild(int index)
                     throws java.lang.IndexOutOfBoundsException
        Return the direct descendant given by the index.
        Parameters:
        index - index of child node (index origin 0)
        Returns:
        direct child node specified by index.
        Throws:
        java.lang.IndexOutOfBoundsException - index was greater than child count
      • addChild

        void addChild(IComponent iComp)
        Add a direct child object to the current composite element. The child should be inserted at the tail.
        Parameters:
        iComp - interface to the new child element
      • remove

        boolean remove(IComponent iComp)
        Remove the specified child from the composite element
        Parameters:
        iComp - interface to the child to be removed
        Returns:
        true if child was found and removed, false otherwise
      • propagate

        void propagate(IProbe probe)
                throws ModelException
        Propagates the Probe object through this composite element sequentially element by element.

        NOTES: CKA
        · This looks to be redundant! It is overriding the same method in the super interface IComponent.

        Specified by:
        propagate in interface IComponent
        Parameters:
        probe - probe state will be advance using the elements dynamics
        Throws:
        ModelException - an error advancing probe state
        See Also:
        IComponent.propagate(IProbe)