fr.ove.utils
Class NumberUtils

java.lang.Object
  extended byfr.ove.utils.NumberUtils

public class NumberUtils
extends java.lang.Object

Version:
2.0 28/06/1999
Author:
© 1999 DIRAT Laurent

Constructor Summary
NumberUtils()
           
 
Method Summary
static java.lang.String formatDouble(java.lang.String dValue)
          Formats the specified double value with two digits after decimal place
static boolean isFloat(java.lang.String token)
          Analyzes the token and determines wheter it is an integer or a float.
static boolean isNumber(java.lang.String token)
          Analyzes a token and determines whether it is a number (integer or float) or not.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

NumberUtils

public NumberUtils()
Method Detail

isNumber

public static boolean isNumber(java.lang.String token)
Analyzes a token and determines whether it is a number (integer or float) or not.
If not, considers this token as a variable.

Parameters:
token - the token to anlazye.
Returns:
true if the token is a number. false otherwise.

isFloat

public static boolean isFloat(java.lang.String token)
Analyzes the token and determines wheter it is an integer or a float. We assume that the specified token is already a number.

Parameters:
token - the token to analyze.
Returns:
true if the token is a float. false if the token is an integer.

formatDouble

public static java.lang.String formatDouble(java.lang.String dValue)
Formats the specified double value with two digits after decimal place

Parameters:
dValue - the value to format.


Copyright © 1999-2007 Universit?© de Nice Sophia-Antipolis, I3S, Ove SARL, DFKI and Universit?§t des Saarlandes. All Rights Reserved.