Project 1

cscie259.project1.mf
Class Attr

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

public class Attr
extends Node

A simplified, non-interface version of org.w3c.dom.Attr. You MAY modify this file to whatever extent you see fit, provided you retain the current declarations and definitions of, at least, getNodeType and appendChild.

Version:
6.0
Author:
Computer Science E-259, YOUR NAME GOES HERE

Field Summary
 
Fields inherited from class cscie259.project1.mf.Node
ATTRIBUTE_NODE, DOCUMENT_NODE, ELEMENT_NODE, TEXT_NODE
 
Method Summary
 void appendChild(Node newChild)
          Throws a RuntimeException, since attributes cannot have children.
 int getNodeType()
          Returns code (Node.ATTRIBUTE_NODE) 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
 

Method Detail

appendChild

public void appendChild(Node newChild)
Throws a RuntimeException, since attributes 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.ATTRIBUTE_NODE) signifying this node's type.

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

Project 1