dk.brics.xmlgraph
Class SingleContentNode

java.lang.Object
  extended by dk.brics.xmlgraph.Node
      extended by dk.brics.xmlgraph.SingleContentNode
All Implemented Interfaces:
Serializable, Cloneable
Direct Known Subclasses:
AttributeNode, ElementNode, OneOrMoreNode

public abstract class SingleContentNode
extends Node

Abstract superclass for nodes with a single sub-node.

See Also:
Serialized Form

Field Summary
protected  int content
          Index of sub-node.
 
Fields inherited from class dk.brics.xmlgraph.Node
index, origin
 
Constructor Summary
SingleContentNode(int content, Origin origin)
          Constructor for node with a single sub-node.
 
Method Summary
protected abstract  SingleContentNode clone()
          Clones this node.
 int getContent()
          Returns the index of the sub-node.
 void setContent(int content)
          Sets the sub-node.
 
Methods inherited from class dk.brics.xmlgraph.Node
getIndex, getOrigin, process, setOrigin
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

content

protected int content
Index of sub-node.

Constructor Detail

SingleContentNode

public SingleContentNode(int content,
                         Origin origin)
Constructor for node with a single sub-node.

Parameters:
content - index of sub-node
origin - source information (null if not applicable)
Method Detail

clone

protected abstract SingleContentNode clone()
Description copied from class: Node
Clones this node.

Specified by:
clone in class Node

getContent

public int getContent()
Returns the index of the sub-node.

Returns:
node node index

setContent

public void setContent(int content)
Sets the sub-node.

Parameters:
content - node index


Copyright © 2005-2010 Anders Møller.