List of usage examples for org.joda.time Seconds parseSeconds
@FromString public static Seconds parseSeconds(String periodStr)
Seconds
by parsing a string in the ISO8601 format 'PTnS'. From source file:griffon.plugins.jodatime.editors.SecondsPropertyEditor.java
License:Apache License
private void handleAsString(String str) { if (isBlank(str)) { super.setValueInternal(null); return;/*from w w w.ja v a2 s . com*/ } try { super.setValueInternal(parse(Integer.parseInt(str))); return; } catch (NumberFormatException nfe) { // ignore } try { super.setValueInternal(Seconds.parseSeconds(str)); } catch (IllegalArgumentException e) { throw illegalValue(str, Seconds.class, e); } }