doubleutility.java
来自「pso源程序」· Java 代码 · 共 52 行
JAVA
52 行
/** * Description: The description of a utility: an AbstractNode with value in double type. * * @ Author Create/Modi Note * Xiaofeng Xie Feb 19, 2004 * * @version 1.0 */package Global.basic.nodes.utilities;import Global.methods.*;public class DoubleUtility extends StringableUtility { protected DoubleUtility(String outName) { super(outName); this.description = "double"; } public DoubleUtility(String outName, double defaultV) { this(outName); this.setValue(new Double(defaultV)); } public boolean isValidDataType(Object data) { try { data = new Double(data.toString()); return true; } catch (Exception e) { return false; } } public String getValueString() { return TypeConverter.toString(getDefaultValue()); } protected Object getRealObject(String sVal) throws Exception { return new Double(TypeConverter.toDouble(sVal)); } public double getDefaultValue() { return ((Double)value).doubleValue(); } public Object getClonedValue(Object value) { if(value==null) return null; return new Double(value.toString()); }}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?