com.carlosbcruz.account.util
Class AccountValues

java.lang.Object
  extended by com.carlosbcruz.account.util.AccountValues

public class AccountValues
extends java.lang.Object

Helps in mantain the values under defined limits

Author:
Carlos Fernando Bella Cruz - pessoal@carlosbcruz.com

Constructor Summary
AccountValues()
           
 
Method Summary
static java.lang.Number getNumberFromText(java.lang.String text)
          Extract the number that is inserted inside a String
static float getTwoDecimalFloat(float value)
          Eliminate the rounding problem and sick to two decimals This is necessary because of rouding problems of floats
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AccountValues

public AccountValues()
Method Detail

getTwoDecimalFloat

public static float getTwoDecimalFloat(float value)
Eliminate the rounding problem and sick to two decimals This is necessary because of rouding problems of floats

Parameters:
value - The value.
Returns:
The value with at maximum of two decimals.

getNumberFromText

public static java.lang.Number getNumberFromText(java.lang.String text)
                                          throws NumberNotFoundException
Extract the number that is inserted inside a String

Parameters:
text - The text to be searched
Returns:
The value
Throws:
NumberNotFoundException