util
Class MultiParse

java.lang.Object
  extended by util.MultiParse

public class MultiParse
extends Object

Simple class that allows parsing of a string to an object using a variable number of formatters. The first one to succeed wins.


Constructor Summary
MultiParse()
           
 
Method Summary
static Object tryAll(String s, Format... f)
          Parses a string into an object using the supplied formatters, until success.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MultiParse

public MultiParse()
Method Detail

tryAll

public static Object tryAll(String s,
                            Format... f)
                     throws ParseException
Parses a string into an object using the supplied formatters, until success. If parsing is unsuccessful, even with all formatter applied, we throw an exception.

Throws:
ParseException