Interface Ancestry


  • public interface Ancestry
    Defines the family relationships of an ElementHandler.
    Since:
    7 Apr 2005
    Author:
    Mark Taylor (Starlink)
    • Method Detail

      • getSelf

        ElementHandler getSelf()
        Returns the handler itself.
        Returns:
        self
      • getParent

        ElementHandler getParent()
        Returns the handler's parent.
        Returns:
        parent
      • getAncestor

        ElementHandler getAncestor​(java.lang.Class clazz)
        Returns the handler's nearest ancestor (excluding itself) of a given class. clazz must be ElementHandler or a subclass. If there is no handler in the ancestry of type clazz, null is returned.
        Parameters:
        clazz - class required
        Returns:
        handler's ancestor of type clazz
      • getSiblingIndex

        int getSiblingIndex()
        Returns the index of this child in the list of its parent's children. The first child of a parent has index 0.
        Returns:
        sibling index
      • getChildCount

        int getChildCount()
        Returns the number of child elements this handler currently has.
        Returns:
        child count