/**
 * This class simplifies throwing exceptions.
 */
public class Throw {
/**
 *
 */
    public static void If(boolean necessaryCondition, String message){
        if(necessaryCondition){
            throw new RuntimeException(message);
        }
    }

/**
 *
 */
    public static void IfOut(int index, int hi){
        if(index<0||index>=hi){
            throw new RuntimeException("index out of range");
        }
    }

}
