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

📄 nvariable.java

📁 是zuojie用java实现的gep库
💻 JAVA
字号:
package gep.num;import gep.Expression;import java.util.ArrayList;import java.util.List;/** * 变量 */public class NVariable implements NExpression{	public static final int arity = 0;		private char code;	private double value;	public NVariable(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(double value)	{		this.value = value;	}	public double evaluate()	{		return value;	}		public String toString()	{		return "" + code;	}	public List getChildren()	{		List children = new ArrayList();				return children;	}}

⌨️ 快捷键说明

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