XML Parser for Java 1.1.16

com.ibm.xml.parser
Class CM2op

java.lang.Object
  |
  +--com.ibm.xml.parser.CMNode
        |
        +--com.ibm.xml.parser.CM2op

public class CM2op
extends CMNode

CM2op provides content model support for content model nodes that contain the "|", or "," language primitives. Refer to ElementDecl for an overview of the content model, and how these language primitives are used to express relationships.

Version:
Revision: 90 1.9 src/com/ibm/xml/parser/CM2op.java, xml4jsrc, xml4j-jtcsv, xml4j_1_1_16
See Also:
ElementDecl, CMNode, CMLeaf, Serialized Form

Constructor Summary
CM2op(int type, CMNode leftNode, CMNode rightNode)
          Constructor.
 
Method Summary
 boolean equals(java.lang.Object obj)
           
 CMNode getLeft()
          Returns the content model node prior to the separator type.
 CMNode getRight()
          Returns the content model node after the separator type.
 int getType()
          Returns the language primitive associated with this content model node.
 int hashCode()
           
 void setLeft(CMNode leftNode)
          Sets the content model node prior to the separator type.
 void setRight(CMNode rightNode)
          Sets the content model node after the separator type.
 java.lang.String toString()
          Returns the string representation of this left and right content model nodes and its associated separator language primitive.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

CM2op

public CM2op(int type,
             CMNode leftNode,
             CMNode rightNode)
Constructor.
Parameters:
type - The language primitive associated with this content model node. Must be "|", or ",".
leftNode - The content model node prior to the type separator, or null if left will be set later.
rightNode - The content model node after the type separator, or null if right will be set later.
Method Detail

getType

public int getType()
Returns the language primitive associated with this content model node.
Returns:
"|", or "," (should never be null).

getLeft

public CMNode getLeft()
Returns the content model node prior to the separator type.
Returns:
The content model node prior to the separator type, or null if no node currently exists.
See Also:
setLeft(com.ibm.xml.parser.CMNode)

setLeft

public void setLeft(CMNode leftNode)
Sets the content model node prior to the separator type.
Parameters:
leftNode - The content model node prior to the separator type.
See Also:
getLeft()

getRight

public CMNode getRight()
Returns the content model node after the separator type.
Returns:
The content model node after the separator type, or null if no node currently exists.
See Also:
setRight(com.ibm.xml.parser.CMNode)

setRight

public void setRight(CMNode rightNode)
Sets the content model node after the separator type.
Parameters:
rightNode - The content model node after the separator type.
See Also:
getRight()

toString

public java.lang.String toString()
Returns the string representation of this left and right content model nodes and its associated separator language primitive. Example: (elementX|elementY)
Returns:
The string representation of this left and right content model nodes and its separator (should never be null).
Overrides:
toString in class java.lang.Object

equals

public boolean equals(java.lang.Object obj)
Overrides:
equals in class java.lang.Object

hashCode

public int hashCode()
Overrides:
hashCode in class java.lang.Object

XML Parser for Java 1.1.16