vboolean.java
来自「一个简单的visio程序。」· Java 代码 · 共 70 行
JAVA
70 行
package HECore.stddata;
import java.util.*;
import java.lang.*;
import HPCore.Exception.*;
public class VBoolean extends VNumber{
private boolean bool;
/**
* Constructs a VBoolean object representing a boolean in VB
*/
public VBoolean(boolean b)
{
super(b);
bool=b;
}
/**
* Constructs a VBoolean object representing any number type(for examples: int long ...) in VB
*/
public VBoolean(double db)
{
super(db);
if((int)db!=0)
bool=true;
else
bool=false;
}
/**
* Returns a boolean represention of the VBoolean object
*/
public boolean boolValue()
{
return bool;
}
/**
* Returns this object type
*/
public short getType()
{
return V_BOL;
}
/**
* Returns the string representaion of the VBoolean object .
*/
public String toString()
{
return (bool == true)? "True":"False";
}
/**
* Returns the string representaion of the VBoolean object .
*/
public String strValue(){
return toString();
}
}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?