/** * Construct a duration object initialized from the given string in the format of a serialized * xs:duration item. Examples: P2Y3M141DT12H46M12.34S, -P92M, -P32M2DT0.2S. * * @param duration * An xs:duration value as defined by <a * href="http://www.w3.org/TR/xmlschema-2/#duration>XML Schema Part 2: Datatypes</a> * @throws IllegalArgumentException * If the given string is not a valid duration value. */ public Duration(String duration) { parseDuration(duration); }