net.sf.saxon.tree.tiny

## Class TinyParentNodeImpl

- java.lang.Object
- - net.sf.saxon.tree.tiny.TinyNodeImpl
  - - net.sf.saxon.tree.tiny.TinyParentNodeImpl

- All Implemented Interfaces:
    Source, SourceLocator, PullEvent, FingerprintedNode, Item, NodeInfo, Sequence
  Direct Known Subclasses:
    TinyDocumentImpl, TinyElementImpl

      public abstract class TinyParentNodeImpl
      extends TinyNodeImpl

  TinyParentNodeImpl is an implementation of a non-leaf node (specifically, an Element node or a Document node)
  Author:
    Michael H. Kay

- - ### Field Summary

    - ### Fields inherited from class net.sf.saxon.tree.tiny.TinyNodeImpl

      `NODE_LETTER, nodeNr, parent, tree`

    - ### Fields inherited from interface net.sf.saxon.om.NodeInfo

      `ALL_NAMESPACES, IS_DTD_TYPE, IS_NILLED, LOCAL_NAMESPACES, NO_NAMESPACES`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `TinyParentNodeImpl()`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `String` | `getStringValue()` Return the string-value of the node, that is, the concatenation of the character content of all descendent elements and text nodes.
    `CharSequence` | `getStringValueCS()` Get the value of the item as a CharSequence.
    `static CharSequence` | `getStringValueCS(TinyTree tree, int nodeNr)` Get the string value of a node.
    `boolean` | `hasChildNodes()` Determine if the node has children.

    - ### Methods inherited from class net.sf.saxon.tree.tiny.TinyNodeImpl

      `compareOrder, comparePosition, equals, generateId, getAttributeValue, getAttributeValue, getBaseURI, getColumnNumber, getConfiguration, getDeclaredNamespaces, getDisplayName, getDocumentNumber, getDocumentRoot, getFingerprint, getLineNumber, getLocalPart, getNameCode, getNamePool, getNodeNumber, getParent, getPrefix, getPublicId, getRoot, getSchemaType, getSequenceNumber, getSystemId, getTree, getTypeAnnotation, getURI, hashCode, head, isAncestorOrSelf, isId, isIdref, isNilled, isSameNodeInfo, iterate, iterateAxis, iterateAxis, setParentNode, setSystemId`

    - ### Methods inherited from class java.lang.Object

      `clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait`

    - ### Methods inherited from interface net.sf.saxon.om.NodeInfo

      `atomize, copy, getNodeKind`

- - ### Constructor Detail

    - #### TinyParentNodeImpl

          public TinyParentNodeImpl()

  - ### Method Detail

    - #### hasChildNodes

          public final boolean hasChildNodes()

      Determine if the node has children.
      Specified by:
        `hasChildNodes` in interface `NodeInfo`
      Overrides:
        `hasChildNodes` in class `TinyNodeImpl`
      Returns:
        `true` if this node has any attributes, `false` otherwise.

    - #### getStringValue

          public final String getStringValue()

      Return the string-value of the node, that is, the concatenation of the character content of all descendent elements and text nodes.
      Returns:
        the accumulated character content of the element, including descendant elements.
      See Also:
        `Item.getStringValueCS()`

    - #### getStringValueCS

          public final CharSequence getStringValueCS()

      Get the value of the item as a CharSequence. This is in some cases more efficient than the version of the method that returns a String.
      Specified by:
        `getStringValueCS` in interface `Item`
      Overrides:
        `getStringValueCS` in class `TinyNodeImpl`
      Returns:
        the string value of the item
      See Also:
        `Item.getStringValue()`

    - #### getStringValueCS

          public static CharSequence getStringValueCS(TinyTree tree,
                                      int nodeNr)

      Get the string value of a node. This static method allows the string value of a node to be obtained without instantiating the node as a Java object. The method also returns a CharSequence rather than a string, which means it can sometimes avoid copying the data.
      Parameters:
        `tree` - The containing document
        `nodeNr` - identifies the node whose string value is required. This must be a document or element node. The caller is trusted to ensure this.
      Returns:
        the string value of the node, as a CharSequence

Copyright (c) 2004-2013 Saxonica Limited. All rights reserved.