home *** CD-ROM | disk | FTP | other *** search
/ Cre@te Online 2000 December / Cre@teOnline CD05.iso / MacSoft / XML ConsoleMax.sea / XML ConsoleMax / Required / xml4j.jar / com / ibm / xml / internal / CMNode.class (.txt) < prev    next >
Encoding:
Java Class File  |  1999-08-30  |  1022 b   |  50 lines

  1. package com.ibm.xml.internal;
  2.  
  3. abstract class CMNode {
  4.    private int fType;
  5.    private CMStateSet fFirstPos;
  6.    private CMStateSet fFollowPos;
  7.    private CMStateSet fLastPos;
  8.    private int fMaxStates = -1;
  9.  
  10.    CMNode(int var1) throws CMException {
  11.       this.fType = var1;
  12.    }
  13.  
  14.    abstract boolean isNullable() throws CMException;
  15.  
  16.    final int type() {
  17.       return this.fType;
  18.    }
  19.  
  20.    final CMStateSet firstPos() throws CMException {
  21.       if (this.fFirstPos == null) {
  22.          this.fFirstPos = new CMStateSet(this.fMaxStates);
  23.          this.calcFirstPos(this.fFirstPos);
  24.       }
  25.  
  26.       return this.fFirstPos;
  27.    }
  28.  
  29.    final CMStateSet lastPos() throws CMException {
  30.       if (this.fLastPos == null) {
  31.          this.fLastPos = new CMStateSet(this.fMaxStates);
  32.          this.calcLastPos(this.fLastPos);
  33.       }
  34.  
  35.       return this.fLastPos;
  36.    }
  37.  
  38.    final void setFollowPos(CMStateSet var1) {
  39.       this.fFollowPos = var1;
  40.    }
  41.  
  42.    final void setMaxStates(int var1) {
  43.       this.fMaxStates = var1;
  44.    }
  45.  
  46.    protected abstract void calcFirstPos(CMStateSet var1) throws CMException;
  47.  
  48.    protected abstract void calcLastPos(CMStateSet var1) throws CMException;
  49. }
  50.