All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.alogic.metrics.Value Maven / Gradle / Ivy

There is a newer version: 1.6.17
Show newest version
package com.alogic.metrics;

import com.alogic.metrics.Fragment.DataType;
import com.alogic.metrics.Fragment.Method;
import com.anysoft.util.JsonSerializer;


/**
 * 量度值
 * 
 * @author duanyy
 *
 * @since 1.6.6.13
 *
 */
public interface Value extends JsonSerializer{
	
	/**
	 * 累加
	 * @param other 其它的指标
	 * @return 新的实例
	 */
	public Value incr(Value other);
	
	/**
	 * 获取指标的累加方法
	 * @return 累加方法
	 */
	public Method method();
	
	/**
	 * 获取数据类型
	 * @return 数据类型
	 */
	public DataType type();
	
	/**
	 * 获取数据的key
	 * @return key
	 */
	public String key();
	
	/**
	 * 获取量度值
	 * @return 量度值
	 */
	public Object value();
	
	/**
	 * 获取字符串值
	 * @param dftValue 缺省值
	 * @return 量度值
	 */
	public String asString(String dftValue);

	/**
	 * 获取double值
	 * @param dftValue 缺省值
	 * @return 量度值
	 */
	public double asDouble(double dftValue);
	
	/**
	 * 获取long值
	 * @param dftValue 缺省值
	 * @return 量度值
	 */
	public long asLong(long dftValue);
	
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy