private static GDay parseGDayInternal(String str, GDay result) throws ParseException { if (str == null) { throw new IllegalArgumentException("The string to be parsed must not be null."); } if (result == null) { result = new GDay(); } char[] chars = str.toCharArray(); if (chars[0] != '-' || chars[1] != '-' || chars[2] != '-') { throw new ParseException(BAD_GDAY+str+"\nA gDay must follow the pattern ---DD(Z|((+|-)hh:mm)).", 0); } int idx = 2; idx = parseDay(str, result, chars, idx, BAD_GDAY); parseTimeZone(str, result, chars, idx, BAD_GDAY); return result; } //parse
private static GDay parseGDayInternal(String str, GDay result) throws ParseException { if (str == null) { throw new IllegalArgumentException("The string to be parsed must not be null."); } if (result == null) { result = new GDay(); } char[] chars = str.toCharArray(); if (chars[0] != '-' || chars[1] != '-' || chars[2] != '-') { throw new ParseException( BAD_GDAY + str + "\nA gDay must follow the pattern ---DD(Z|((+|-)hh:mm)).", 0); } int idx = 2; idx = parseDay(str, result, chars, idx, BAD_GDAY); parseTimeZone(str, result, chars, idx, BAD_GDAY); return result; } // parse