org.infoglue.cms.util
Class MathHelper

java.lang.Object
  |
  +--org.infoglue.cms.util.MathHelper

public class MathHelper
extends java.lang.Object

Author:
ss Various mathematical functions accesible to templateEditors

Constructor Summary
MathHelper()
           
 
Method Summary
 java.lang.String fileSize(long size)
           
 java.lang.String fileSize(long size, java.util.Locale locale)
           
 int getRandom()
          Gets a random number.
 int getRandom(int upperLimit)
          Gets a random number with an upper limit.
 int hexToDecimal(java.lang.String hex)
           
 java.lang.Integer stringToInteger(java.lang.String value)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MathHelper

public MathHelper()
Method Detail

hexToDecimal

public int hexToDecimal(java.lang.String hex)

fileSize

public java.lang.String fileSize(long size)

fileSize

public java.lang.String fileSize(long size,
                                 java.util.Locale locale)

stringToInteger

public java.lang.Integer stringToInteger(java.lang.String value)

getRandom

public int getRandom()
Gets a random number.


getRandom

public int getRandom(int upperLimit)
Gets a random number with an upper limit.