absknowledgeelement.java

来自「pso源程序」· Java 代码 · 共 34 行

JAVA
34
字号
/**
 * Description: For any knowledge element
 *
 * @ Author        Create/Modi     Note
 * Xiaofeng Xie    Oct 06, 2006
 *
 * @version 1.0
 */

package maosKernel.represent;

import maosKernel.represent.*;
import maosKernel.represent.landscape.*;

public abstract class AbsKnowledgeElement extends AbsInformationElement implements ISetLandscapeInfoEngine {
  boolean isRootLandscapeInfoOK = false;

  //init only once
  final public void setInfo(AbsLandscape landscape){
    if (isRootLandscapeInfoOK) return;
    //set leaf info
    for(int i=0; i<super.getUtilSize(); i++) {
      Object object = super.getUtilityAt(i).getValue();
      if (object!=null && object instanceof AbsKnowledgeElement) {
        ((ISetLandscapeInfoEngine)object).setInfo(landscape);
      }
    }
    setRootInfo(landscape);
    isRootLandscapeInfoOK = true;
  }

  protected void setRootInfo(AbsLandscape landscape){}
}

⌨️ 快捷键说明

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