Speichervergabe
Class Check

java.lang.Object
  |
  +--Speichervergabe.Check

public class Check
extends java.lang.Object

This class only contains some check-methods to use for validating inputs and some general help-routines


Constructor Summary
Check()
           
 
Method Summary
static int getInt(java.lang.String inputText)
          Returns the int value of the given inputText, if no int return -1
static int getLog(int intValue)
          Returns k, the solution of the equation: intValue = 2^k
static int getNextPow(int intValue)
          Returns the next power of 2 that is <= the given integer value.
static boolean isInt(java.lang.String inputText)
          Checks the given inputText to be an int or not.
 
Methods inherited from class java.lang.Object
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, registerNatives, toString, wait, wait, wait
 

Constructor Detail

Check

public Check()
Method Detail

isInt

public static boolean isInt(java.lang.String inputText)
Checks the given inputText to be an int or not.

getInt

public static int getInt(java.lang.String inputText)
Returns the int value of the given inputText, if no int return -1

getLog

public static int getLog(int intValue)
Returns k, the solution of the equation: intValue = 2^k

getNextPow

public static int getNextPow(int intValue)
Returns the next power of 2 that is <= the given integer value.