XmlTextInfoArg (API documentation of hlt.language packages)
Date: 2013-01-30

hlt.language.syntax

## Class XmlTextInfoArg

- java.lang.Object
- - hlt.language.syntax.XmlTextInfoArg

- Direct Known Subclasses:
    XmlTextInfo

      public class XmlTextInfoArg
      extends java.lang.Object

  This is the class of information packaging an argument of a `$TEXT` special forms. A special form `$TEXT(...)` has arguments, each one being either:
  1. a literal (unquoted, or posssibly single- or double-quote) string; or,
  2. an `XmlTreePath` representing a path expression of the form `c[x1...xn]/a`, where `c` and the `xi`'s are positive integers, `a` is a symbol, and where both `[x1...xn]` and `/a`, are optional.
  Version:
    Last modified on Fri Apr 13 20:22:44 2012 by hak
  Author:
    Hassan Aït-Kaci
  Copyright:
    © by the author

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `XmlTextInfoArg()` Constructs an empty `XmlTextInfoArg`.
    `XmlTextInfoArg(int child, int[] path, java.lang.String attribute)` Constructs an `XmlTextInfoArg` with specified child position, (possibly null) xml path, and a (possibly null) attribute name.
    `XmlTextInfoArg(int child, IntArrayList path, java.lang.String attribute)` Constructs an `XmlTextInfoArg` with specified child position, (possibly null) xml path, and a (possibly null) attribute name.
    `XmlTextInfoArg(int child, java.lang.String attribute)` Constructs an `XmlTextInfoArg` with specified child position and a (possibly null) attribute name.
    `XmlTextInfoArg(java.lang.String attribute)` Constructs an `XmlTextInfoArg` with specified child position, (possibly null) xml path, and a (possibly null) attribute name.
    `XmlTextInfoArg(XmlTreePath xmlTreePath)` Constructs an `XmlTextInfoArg` with specified child position and an attribute name.

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `java.lang.String` | `attribute()` Returns the Xml tree attribute, when there is one.
    `int` | `child()` Returns the child index, when there is one.
    `boolean` | `hasAttribute()` Returns the `true` whenever this refers to an attribute.
    `boolean` | `hasChild()` Returns `true` whenever this has a child index.
    `boolean` | `hasPath()` Returns `true` whenever this has a non-vacuous XML tree address.
    `boolean` | `hasXmlTreePath()` Returns `true` whenever this has a non-null `XmlTreePath`.
    `boolean` | `isLiteral()` Returns `true` whenever this represents a literal string.
    `java.lang.String` | `makeTextForm(ArrayList xmlForms, IntToIntMap childMap)` Returns a text form for this `XmlTextInfoArg` given the supplied context.
    `int[]` | `path()` Returns the XML tree address, when there is one.
    `XmlTextInfoArg` | `setChild(int child)` Sets the child position index to the specified integer and returns this `XmlTextInfoArg`.
    `XmlTextInfoArg` | `setPath(int[] path)` Sets the XML tree address path to the specified `int[]` and returns this `XmlTextInfoArg`.
    `XmlTextInfoArg` | `setText(java.lang.String text)` Sets the `_text` filed to `text` and returns this.
    `XmlTextInfoArg` | `setXmlTreePath(XmlTreePath path)` Sets `_xmlTreePath` to the specified `XmlTreePath` and returns this `XmlTextInfoArg`.
    `java.lang.String` | `text()` Returns the text string.
    `java.lang.String` | `toString()` Returns a `String` form of this `XmlTextInfoArg`.
    `XmlTreePath` | `xmlTreePath()` Returns the `XmlTreePath` object if there is one, or `null`, otherwise.

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

      `equals, getClass, hashCode, notify, notifyAll, wait, wait, wait`

- - ### Constructor Detail

    - #### XmlTextInfoArg

          public XmlTextInfoArg()

      Constructs an empty `XmlTextInfoArg`.

    - #### XmlTextInfoArg

          public XmlTextInfoArg(XmlTreePath xmlTreePath)

      Constructs an `XmlTextInfoArg` with specified child position and an attribute name.

    - #### XmlTextInfoArg

          public XmlTextInfoArg(java.lang.String attribute)

      Constructs an `XmlTextInfoArg` with specified child position, (possibly null) xml path, and a (possibly null) attribute name.

    - #### XmlTextInfoArg

          public XmlTextInfoArg(int child,
                        java.lang.String attribute)

      Constructs an `XmlTextInfoArg` with specified child position and a (possibly null) attribute name.

    - #### XmlTextInfoArg

          public XmlTextInfoArg(int child,
                        int[] path,
                        java.lang.String attribute)

      Constructs an `XmlTextInfoArg` with specified child position, (possibly null) xml path, and a (possibly null) attribute name.

    - #### XmlTextInfoArg

          public XmlTextInfoArg(int child,
                        IntArrayList path,
                        java.lang.String attribute)

      Constructs an `XmlTextInfoArg` with specified child position, (possibly null) xml path, and a (possibly null) attribute name.

  - ### Method Detail

    - #### isLiteral

          public boolean isLiteral()

      Returns `true` whenever this represents a literal string.

    - #### text

          public java.lang.String text()

      Returns the text string.

    - #### setText

          public XmlTextInfoArg setText(java.lang.String text)

      Sets the `_text` filed to `text` and returns this.

    - #### child

          public int child()

      Returns the child index, when there is one.

    - #### hasChild

          public boolean hasChild()

      Returns `true` whenever this has a child index.

    - #### setChild

          public XmlTextInfoArg setChild(int child)

      Sets the child position index to the specified integer and returns this `XmlTextInfoArg`.

    - #### xmlTreePath

          public XmlTreePath xmlTreePath()

      Returns the `XmlTreePath` object if there is one, or `null`, otherwise.

    - #### setXmlTreePath

          public XmlTextInfoArg setXmlTreePath(XmlTreePath path)

      Sets `_xmlTreePath` to the specified `XmlTreePath` and returns this `XmlTextInfoArg`.

    - #### hasXmlTreePath

          public boolean hasXmlTreePath()

      Returns `true` whenever this has a non-null `XmlTreePath`.

    - #### path

          public int[] path()

      Returns the XML tree address, when there is one.

    - #### hasPath

          public boolean hasPath()

      Returns `true` whenever this has a non-vacuous XML tree address.

    - #### setPath

          public XmlTextInfoArg setPath(int[] path)

      Sets the XML tree address path to the specified `int[]` and returns this `XmlTextInfoArg`.

    - #### attribute

          public java.lang.String attribute()

      Returns the Xml tree attribute, when there is one.

    - #### hasAttribute

          public boolean hasAttribute()

      Returns the `true` whenever this refers to an attribute.

    - #### makeTextForm

          public java.lang.String makeTextForm(ArrayList xmlForms,
                                      IntToIntMap childMap)

      Returns a text form for this `XmlTextInfoArg` given the supplied context.

    - #### toString

          public java.lang.String toString()

      Returns a `String` form of this `XmlTextInfoArg`.
      Overrides:
        `toString` in class `java.lang.Object`