src/main/java/pityoulish/pod/server/Main.java
protected static int toInt(String input, int min, int max)
    throws Exception
  {
    int number = Integer.parseInt(input);
    if (number < min)
       throw new Exception(Catalog.ARG_NUMBER_TOO_LOW_0.format());
    if (number > max)
       throw new Exception(Catalog.ARG_NUMBER_TOO_HIGH_0.format());
    return number;
  }
/**
   * Converts a string to an integer and checks the range.
   *
   * @param input   the string to parse
   * @param min     the lowest value allowed, inclusive
   * @param max     the highest value allowed, inclusive
   *
   * @return the parsed value within the allowed range
   *
   * @throws Exception   if the input is invalid or out of range
   */
Converts a string to an integer and checks the range.
@param input   the string to parse
@param min     the lowest value allowed, inclusive
@param max     the highest value allowed, inclusive

@return the parsed value within the allowed range

@throws Exception   if the input is invalid or out of range
Converts a string to an integer and checks the range . @param input the string to parse @param min the lowest value allowed inclusive @param max the highest value allowed inclusive @return the parsed value within the allowed range @throws Exception if the input is invalid or out of range
protected static int toInt(String input, int min, int max)
    throws Exception
  {
    int number = Integer.parseInt(input);
    if (number < min)
       throw new Exception(Catalog.ARG_NUMBER_TOO_LOW_0.format());
    if (number > max)
       throw new Exception(Catalog.ARG_NUMBER_TOO_HIGH_0.format());
    return number;
  }
protected static int toInt ( String input , int min , int max ) throws Exception { int number = Integer . parseInt ( input ) ; if ( number < min ) throw new Exception ( Catalog . ARG_NUMBER_TOO_LOW_0 . format ( ) ) ; if ( number > max ) throw new Exception ( Catalog . ARG_NUMBER_TOO_HIGH_0 . format ( ) ) ; return number ; }
Converts a string to an integer and checks the range.
Converts a string to an integer and checks the range .