📄 ivaluetype.java
字号:
/* * Core - Library of useful classes that are used in many CyberDemia projects. * Copyright (C) 2003 CyberDemia Research and Services * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Library General Public * License as published by the Free Software Foundation; either * version 2 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Library General Public License for more details. * * You should have received a copy of the GNU Library General Public * License along with this library; if not, write to the * Free Software Foundation, Inc., 59 Temple Place - Suite 330, * Boston, MA 02111-1307, USA. * * See the COPYING file located in the top-level-directory of * the archive of this library for complete text of license. */package com.cyberdemia.value;/*** IValueType is an interface for a mutable object that stores a value.* E.g. a wrapper for a primitive type.** @author Alexander Yap* @version $Revision: 1.2 $ at $Date: 2004/02/18 08:35:30 $ by $Author: alexycyap $*/public interface IValueType{ /** * Sets the value as a double. * @param val Value to set. */ void setDoubleValue( double val ); /** * Sets the value as a float. * @param val Value to set. */ void setFloatValue( float val ); /** * Sets the value as a long. * @param val Value to set. */ void setLongValue( long val ); /** * Sets the value as an int. * @param val Value to set. */ void setIntValue( int val ); /** * Sets the value as a short. * @param val Value to set. */ void setShortValue( short val ); /** * Sets the value as a char. * @param val Value to set. */ void setCharValue( char val ); /** * Sets the value as a byte. * @param val Value to set. */ void setByteValue( byte val ); /** * Sets the value as a String. * @param val Value to set. */ void setStringValue( String val ); /** * Gets the value as a double. * @return Value of this object as a double. */ double getDoubleValue(); /** * Gets the value as a float. * @return Value of this object as a float. */ float getFloatValue(); /** * Gets the value as a long. * @return Value of this object as a long. */ long getLongValue(); /** * Gets the value as an int. * @return Value of this object as an int. */ int getIntValue(); /** * Gets the value as a short. * @return Value of this object as a short. */ short getShortValue(); /** * Gets the value as a char. * @return Value of this object as a char. */ char getCharValue(); /** * Gets the value as a byte. * @return Value of this object as a byte. */ byte getByteValue(); /** * Gets the value as a String. * @return Value of this object as a String. */ String getStringValue(); /** * Adds this object with another IValueType. * @param val2 IValueType to add. */ void add( IValueType val2 ); /** * Subtracts another IValueType from this object. * @param val2 IValueType to subtract. */ void subtract( IValueType val2 ); /** * Multiplies this object with another IValueType. * @param val2 IValueType to multiply with. */ void multiply( IValueType val2 ); /** * Multiplies this object with a Number. * @param val2 Number to multiply with. */ void multiply( Number val2 ); /** * Divides this object with another IValueType. * @param val2 IValueType to divide. */ void divide( IValueType val2 ); /** * Divides this object with a Number. * @param val2 Number to divide. */ void divide( Number val2 ); /** * Gets the value as a Number object. * @return Number object */ Number getNumber();}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -