net.sf.xbus.base.core.arithmetic
Class XIntSupport

java.lang.Object
  extended by net.sf.xbus.base.core.arithmetic.XIntSupport

public class XIntSupport
extends java.lang.Object

XIntSupport is a collection of helpful methods concerning integer handling.

Author:
Stephan Dwel

Constructor Summary
XIntSupport()
           
 
Method Summary
static int calculateLength(long value, int radix)
          calculateLength computes the length of an integer in respect to a given radix.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

XIntSupport

public XIntSupport()
Method Detail

calculateLength

public static int calculateLength(long value,
                                  int radix)
calculateLength computes the length of an integer in respect to a given radix. The implementation is simple: dividing in loop.

Parameters:
value - the integer for which to compute the length
radix - the radix for length computation
Returns:
minimum 1