FileDocCategorySizeDatePackage
Util.javaAPI DocphoneME MR2 API (J2ME)2327Wed May 02 18:00:40 BST 2007com.sun.j2me.location

Util

public class Util extends Object
Set of static utility functions for simple repetitive operations.

Fields Summary
Constructors Summary
Methods Summary
public static voidcheckForPermission(int permission, boolean ignoreInterruptedException)

        MIDletSuite suite = Scheduler.getScheduler().getMIDletSuite();
        try {
            suite.checkForPermission(permission, null);
        } catch (InterruptedException ie) {
	    if (!ignoreInterruptedException) {
                throw new SecurityException(
                    "Interrupted while trying to ask the user permission");
	    }
        }
    
public static voidcheckForPermission(int permission)

	checkForPermission(permission, true);
    
public static voidcheckRange(double val, double minimum, double maximum, java.lang.String exceptionComment)

        if (val < minimum || val > maximum) {
            throw new IllegalArgumentException(exceptionComment + val);
        }
        if (Double.isNaN(val)) {
            throw new IllegalArgumentException(exceptionComment + "NaN");
        }