Class FNode

All Implemented Interfaces:
Iterable<Item>
Direct Known Subclasses:
FAttr, FComm, FDoc, FElem, FNSpace, FPI, FTxt

public abstract class FNode extends ANode
Main-memory node fragment.
Author:
BaseX Team 2005-21, BSD License, Christian Gruen
  • Method Details

    • string

      public byte[] string()
      Description copied from class: ANode
      Returns the string value.
      Specified by:
      string in class ANode
      Returns:
      string value
    • finish

      public FNode finish()
      Description copied from class: ANode
      Returns a finalized node instance. This method is called when iterating through node results: If a single node instances is recycled, it needs to be duplicated in the final step.
      Specified by:
      finish in class ANode
      Returns:
      node
    • is

      public final boolean is(ANode node)
      Description copied from class: ANode
      Checks if two nodes are identical.
      Specified by:
      is in class ANode
      Parameters:
      node - node to be compared
      Returns:
      result of check
    • diff

      public final int diff(ANode node)
      Description copied from class: ANode
      Checks the document order of two nodes.
      Specified by:
      diff in class ANode
      Parameters:
      node - node to be compared
      Returns:
      0 if the nodes are identical, or 1/-1 if the node appears after/before the argument
    • parent

      public final ANode parent()
      Description copied from class: ANode
      Returns the parent node.
      Specified by:
      parent in class ANode
      Returns:
      parent node or null
    • parent

      public final void parent(FNode par)
      Description copied from class: ANode
      Sets the parent node.
      Specified by:
      parent in class ANode
      Parameters:
      par - parent node
    • attributeIter

      public BasicNodeIter attributeIter()
      Description copied from class: ANode
      Returns a light-weight, low-level attribute axis iterator with Iter.size() and Iter.get(long) implemented. Before nodes are added to the result, they must be finalized via ANode.finish().
      Specified by:
      attributeIter in class ANode
      Returns:
      iterator
    • childIter

      public BasicNodeIter childIter()
      Description copied from class: ANode
      Returns a light-weight, low-level child axis iterator. Before nodes are added to the result, they must be finalized via ANode.finish().
      Specified by:
      childIter in class ANode
      Returns:
      iterator
    • hasChildren

      public boolean hasChildren()
      Description copied from class: ANode
      Indicates if the node has children.
      Specified by:
      hasChildren in class ANode
      Returns:
      result of test
    • descendantIter

      public final BasicNodeIter descendantIter()
      Description copied from class: ANode
      Returns a light-weight, low-level descendant axis iterator. Before nodes are added to the result, they must be finalized via ANode.finish().
      Specified by:
      descendantIter in class ANode
      Returns:
      iterator
    • descendantOrSelfIter

      public final BasicNodeIter descendantOrSelfIter()
      Description copied from class: ANode
      Returns a light-weight, low-level descendant-or-self axis iterator. Before nodes are added to the result, they must be finalized via ANode.finish().
      Specified by:
      descendantOrSelfIter in class ANode
      Returns:
      iterator
    • toJava

      public final BXNode toJava()
      Description copied from class: Value
      Returns a Java representation of the value.
      Specified by:
      toJava in class ANode
      Returns:
      Java object
    • hashCode

      public final int hashCode()
      Overrides:
      hashCode in class Object
    • equals

      public boolean equals(Object obj)
      Description copied from class: Expr
      This function is e.g. called by:
      Specified by:
      equals in class Expr