FileDocCategorySizeDatePackage
CMUniOp.javaAPI DocJava SE 5 API5284Fri Aug 26 14:55:46 BST 2005com.sun.org.apache.xerces.internal.impl.dtd.models

CMUniOp

public class CMUniOp extends CMNode
Content model Uni-Op node.
version
$Id: CMUniOp.java,v 1.2 2002/01/29 01:15:10 lehors Exp $

Fields Summary
private CMNode
fChild
Constructors Summary
public CMUniOp(int type, CMNode childNode)

        super(type);

        // Insure that its one of the types we require
        if ((type() != XMLContentSpec.CONTENTSPECNODE_ZERO_OR_ONE)
        &&  (type() != XMLContentSpec.CONTENTSPECNODE_ZERO_OR_MORE)
        &&  (type() != XMLContentSpec.CONTENTSPECNODE_ONE_OR_MORE))
        {
            throw new RuntimeException("ImplementationMessages.VAL_UST");
        }

        // Store the node and init any data that needs it
        fChild = childNode;
    
Methods Summary
protected voidcalcFirstPos(com.sun.org.apache.xerces.internal.impl.dtd.models.CMStateSet toSet)

        // Its just based on our child node's first pos
        toSet.setTo(fChild.firstPos());
    
protected voidcalcLastPos(com.sun.org.apache.xerces.internal.impl.dtd.models.CMStateSet toSet)

        // Its just based on our child node's last pos
        toSet.setTo(fChild.lastPos());
    
final com.sun.org.apache.xerces.internal.impl.dtd.models.CMNodegetChild()

        return fChild;
    
public booleanisNullable()

        //
        //  For debugging purposes, make sure we got rid of all non '*'
        //  repetitions. Otherwise, '*' style nodes are always nullable.
        //
        if (type() == XMLContentSpec.CONTENTSPECNODE_ONE_OR_MORE)
	    return fChild.isNullable();
	else
	    return true;