Project 1

cscie259.project1.mf
Class Text

java.lang.Object
  extended bycscie259.project1.mf.Node
      extended bycscie259.project1.mf.Text

public class Text
extends Node

A simplified, non-interface version of org.w3c.dom.Text. You MAY NOT modify this file.

Version:
6.0
Author:
Computer Science E-259

Field Summary
 
Fields inherited from class cscie259.project1.mf.Node
ATTRIBUTE_NODE, DOCUMENT_NODE, ELEMENT_NODE, TEXT_NODE
 
Constructor Summary
Text(java.lang.String value)
          Sets node's value.
 
Method Summary
 void appendChild(Node newChild)
          Throws a RuntimeException, since text nodes cannot have children.
 int getNodeType()
          Returns code (Node.TEXT) signifying this node's type.
 
Methods inherited from class cscie259.project1.mf.Node
getChildNodes, getNodeName, getNodeValue, getParentNode, setNodeName, setNodeValue
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Text

public Text(java.lang.String value)
Sets node's value.

Parameters:
value - value for new text node
Method Detail

appendChild

public void appendChild(Node newChild)
Throws a RuntimeException, since text nodes cannot have children.

Overrides:
appendChild in class Node
Parameters:
newChild - node to be added as a child of this node

getNodeType

public int getNodeType()
Returns code (Node.TEXT) signifying this node's type.

Specified by:
getNodeType in class Node
Returns:
Node.TEXT

Project 1