vdate.java

来自「一个简单的visio程序。」· Java 代码 · 共 73 行

JAVA
73
字号
package HECore.stddata;

import java.lang.*;
import java.util.*;
import HPCore.Exception.*;
public class VDate extends VNumber
{
   private HDate value = null;

    /**
     * Construct a <code>VDate</code> object representing a Date in VB .
   	 * Parameters: 
     * date - a HDate object 
    **/

   public VDate(HDate date){
      super(date.dblValue());
      value = date;
   }
     
    
    /**
     * Construct a <code>VDate</code> object representing a Date in VB .
	 *  Parameters: 
     *   dbl - a double value representing a Date value
    **/
   
   public VDate(double dbl) {
    super(dbl);
    value = new HDate(dbl);
    }
  
     /** 
       * Returns this object type
      **/


   public short getType()
    {
     return V_DATE;
    }
     
   /**
	* Returns a String object representing this VDate object.
	**/
	public String toString() 
	{
		try {
			String date_str = convert.dbl2datestr(value.dblValue());
			return date_str;
		} catch(HpException e) {;}
		return null;
	}
   
   /**
	* Returns a String object representing this VDate object.
	**/
	public String strValue() 
	{
		try {
			String datestr = convert.dbl2datestr(value.dblValue());
			return datestr;
		} catch(HpException e) {;}
		return null;
	}

   /**
	* Returns a double object representing this VDate object. (TZ)
	**/
	public double dblValue() {
		return value.dblValue();
	}
}

⌨️ 快捷键说明

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