@Test public void testParseIllegalExpressions() throws Exception { try { IntervalOfTimeFormat.parse("asdf"); fail("Expected " + IllegalArgumentException.class); } catch (IllegalArgumentException e) { } try { IntervalOfTimeFormat.parse("T_123d"); fail("Expected " + IllegalArgumentException.class); } catch (IllegalArgumentException e) { } try { IntervalOfTimeFormat.parse("_123d"); fail("Expected " + IllegalArgumentException.class); } catch (IllegalArgumentException e) { } try { IntervalOfTimeFormat.parse("X+123d"); fail("Expected " + IllegalArgumentException.class); } catch (IllegalArgumentException e) { } try { IntervalOfTimeFormat.parse("+1ZZZ"); fail("Expected " + IllegalArgumentException.class); } catch (IllegalArgumentException e) { } try { IntervalOfTimeFormat.parse("1PDQ"); fail("Expected " + IllegalArgumentException.class); } catch (IllegalArgumentException e) { } try { IntervalOfTimeFormat.parse("+1PDQ"); fail("Expected " + IllegalArgumentException.class); } catch (IllegalArgumentException e) { } try { IntervalOfTimeFormat.parse("-XYZ"); fail("Expected " + IllegalArgumentException.class); } catch (IllegalArgumentException e) { } try { IntervalOfTimeFormat.parse("+XYZ"); fail("Expected " + IllegalArgumentException.class); } catch (IllegalArgumentException e) { } try { IntervalOfTimeFormat.parse("XYZ"); fail("Expected " + IllegalArgumentException.class); } catch (IllegalArgumentException e) { } try { IntervalOfTimeFormat.parse("200+1Y"); fail("Expected " + IllegalArgumentException.class); } catch (IllegalArgumentException e) { } try { IntervalOfTimeFormat.parse("2000000000000000000000000+1Y"); fail("Expected " + IllegalArgumentException.class); } catch (IllegalArgumentException e) { } }
public static IntervalOfTime parse(String text) { return getDefault().parseInterval(text); }
IntervalOfTimeFormat { public static IntervalOfTime parse(String text) { return getDefault().parseInterval(text); } }
IntervalOfTimeFormat { public static IntervalOfTime parse(String text) { return getDefault().parseInterval(text); }  }
IntervalOfTimeFormat { public static IntervalOfTime parse(String text) { return getDefault().parseInterval(text); }  static IntervalOfTimeFormatter getDefault(); static IntervalOfTimeFormatter intervalForm(); static IntervalOfTime parse(String text); static IntervalOfTime parseIntervalForm(String text); static String print(IntervalOfTime text); static String printIntervalForm(IntervalOfTime text); static String toString(IntervalOfTime text); }
IntervalOfTimeFormat { public static IntervalOfTime parse(String text) { return getDefault().parseInterval(text); }  static IntervalOfTimeFormatter getDefault(); static IntervalOfTimeFormatter intervalForm(); static IntervalOfTime parse(String text); static IntervalOfTime parseIntervalForm(String text); static String print(IntervalOfTime text); static String printIntervalForm(IntervalOfTime text); static String toString(IntervalOfTime text);  }