コード例 #1
0
 public static Duration castToDuration(String s) {
   if (s == null) throw new java.lang.NullPointerException();
   if (s.length() == 0) throw new IllegalArgumentException("Cast to Duration failed.");
   return Duration.parse(s);
 }
コード例 #2
0
 public static String castToString(Duration dur) {
   return dur.toString();
 }