com.twitter.common.util
Class ParsingUtil

java.lang.Object
  extended by com.twitter.common.util.ParsingUtil

public class ParsingUtil
extends Object

Common methods for parsing configs.


Constructor Summary
ParsingUtil()
           
 
Method Summary
static Pair<Integer,Integer> parseRange(String rangeString)
          Parses a string as a range between one integer and another.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ParsingUtil

public ParsingUtil()
Method Detail

parseRange

public static Pair<Integer,Integer> parseRange(String rangeString)
Parses a string as a range between one integer and another. The integers must be separated by a hypen character (space padding is acceptable). Additionally, the first integer (left-hand side) must be less than or equal to the second (right-hand side).

Parameters:
rangeString - The string to parse as an integer range.
Returns:
A pair of the parsed integers.