info.monitorenter.util
Class MathUtil

java.lang.Object
  extended by info.monitorenter.util.MathUtil

public final class MathUtil
extends Object

Static helpers for working with numbers.

Maybe not always the fastest solution to call in here, but working. Also usable for seeing examples and cutting code for manual inlining.

Version:
$Revision: 1.2 $
Author:
Achim.Westermann@gmx.de

Method Summary
static void assertDouble(double d)
          Asserts that the given double is not invalid for calculation.
static MathUtil getInstance()
          Returns the singleton instance of this class.
static boolean isDouble(double d)
          Tests that the given double is not invalid for calculation.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getInstance

public static MathUtil getInstance()
Returns the singleton instance of this class.

This method is useless for now as all methods are static. It may be used in future if VM-global configuration will be put to the state of the instance.

#

Returns:
the singleton instance of this class.

isDouble

public static boolean isDouble(double d)
Tests that the given double is not invalid for calculation.

It must not be one of:

Parameters:
d - the double to test.
Returns:
true if the given double is valid for calculation (not infinite or NaN).

assertDouble

public static void assertDouble(double d)
                         throws IllegalArgumentException
Asserts that the given double is not invalid for calculation.

It must not be one of:

Parameters:
d - the double to test.
Throws:
IllegalArgumentException - if the assertion fails.


Copyright © 2001 - 2007 LGPL, All Rights Footloose.