booleanutility.java

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

JAVA
46
字号
/** * Description: The description of a utility: an AbstractNode with value in boolean type. * * @ Author        Create/Modi     Note * Xiaofeng Xie    Feb 20, 2004 * * @version 1.0 */package Global.basic.nodes.utilities;public class BooleanUtility extends StringableUtility {  public BooleanUtility(String outName) {    super(outName);    this.description = "bool";  }  public BooleanUtility(String outName, boolean defaultV) {    this(outName);    this.setValue(new Boolean(defaultV));  }  public boolean isValidDataType(Object data) {    try {      data = new Boolean(data.toString());      return true;    } catch (Exception e) {      return false;    }  }  public Object getClonedValue(Object value) {    if(value==null) return null;    return new Boolean(value.toString());  }  public boolean getDefaultValue() {    return ((Boolean)value).booleanValue();  }  protected Object getRealObject(String sVal) throws Exception {    return new Boolean(sVal);  }}

⌨️ 快捷键说明

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