⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 compoundinfo.java

📁 SRI international 发布的OAA框架软件
💻 JAVA
字号:
package com.sri.oaa2.icl; 

import java.util.*;

abstract class CompoundInfo 
{
  protected int type;
  protected int numArgs;
  protected ArrayList argList;

  public CompoundInfo(int numArgs) 
  {
    this.numArgs = numArgs;
    this.argList = new ArrayList(numArgs);
  }

  abstract public IclTerm assemble();

  public final int getNumArgsExpected() 
  {
    return numArgs;
  }

  public final int getNumArgsReceived() 
  {
    return argList.size();
  }

  public final boolean readyForAssembly() 
  {
    return (argList.size() == numArgs);
  }

  public final void addArgument(IclTerm arg) 
  {
    if(argList.size() < numArgs) {
      argList.add(arg);
    }
    else {
      throw new CompoundTooManyArgs();
    }
  }

  public final int getType() 
  {
    return this.type;
  }
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -