src/main/java/org/jboss/util/Strings.java
/**
    * Same like parseTimePeriod(), but guards for negative entries.
    * 
    * @param period the stringfied time period
    * @return the parsed time period as long
    * @throws NumberFormatException
    */
Same like parseTimePeriod(), but guards for negative entries.

@param period the stringfied time period
@return the parsed time period as long
@throws NumberFormatException
Same like parseTimePeriod () but guards for negative entries . @param period the stringfied time period @return the parsed time period as long @throws NumberFormatException
public static long parsePositiveTimePeriod(String period)
   {
      long retval = parseTimePeriod(period);
      if (retval < 0)
      {
         throw new NumberFormatException("Negative input time period: '" + period + "'");
      }
      return retval;
   }
public static long parsePositiveTimePeriod ( String period ) { long retval = parseTimePeriod ( period ) ; if ( retval < 0 ) { throw new NumberFormatException ( "Negative input time period: '" + period + "'" ) ; } return retval ; }
Same like parseTimePeriod(), but guards for negative entries.
Same like parseTimePeriod () but guards for negative entries .