bvariable.java
来自「是zuojie用java实现的gep库」· Java 代码 · 共 60 行
JAVA
60 行
package gep.bool;import gep.Expression;import java.util.ArrayList;import java.util.List;/** * 变量 */public class BVariable implements BExpression{ public static final int arity = 0; private char code; private boolean value; public BVariable(char code) { this.code = code; } public char getCode() { return code; } public int getArity() { return arity; } public void addChild(Expression child) { throw new IllegalStateException("ADD_CHILD_ERROR"); } public void setValue(boolean value) { this.value = value; } public boolean evaluate() { return value; } public String toString() { return "" + code; } public List getChildren() { List children = new ArrayList(); return children; }}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?