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

📄 treenode.java

📁 这个是perst-269.zip下面的SOURCECODE,和大家分享了。
💻 JAVA
字号:
import org.garret.perst.*;

public class TreeNode extends Persistent { 
    public String   question;
    public TreeNode yes;    
    public TreeNode no;
    
    public void writeObject(IOutputStream out) { 
        out.writeString(question);
        out.writeObject(yes);        
        out.writeObject(no);
    }

    
    public void readObject(IInputStream in) { 
        question = in.readString();
        yes = (TreeNode)in.readObject();        
        no = (TreeNode)in.readObject();        
    }

    public TreeNode(TreeNode no, String question, TreeNode yes) { 
        this.yes = yes;
        this.question = question;
        this.no = no;
    }

    public TreeNode() {}
}

⌨️ 快捷键说明

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