341 |
} |
} |
342 |
|
|
343 |
/** |
/** |
344 |
* This method returns the format symbol information used for parsing |
* This method returns a copy of the format symbol information used |
345 |
* and formatting dates. |
* for parsing and formatting dates. |
346 |
* |
* |
347 |
* @return The date format symbols. |
* @return a copy of the date format symbols. |
348 |
*/ |
*/ |
349 |
public DateFormatSymbols getDateFormatSymbols() |
public DateFormatSymbols getDateFormatSymbols() |
350 |
{ |
{ |
351 |
return formatData; |
return (DateFormatSymbols) formatData.clone(); |
352 |
} |
} |
353 |
|
|
354 |
/** |
/** |
356 |
* and formatting dates. |
* and formatting dates. |
357 |
* |
* |
358 |
* @param formatData The date format symbols. |
* @param formatData The date format symbols. |
359 |
|
* @throws NullPointerException if <code>formatData</code> is null. |
360 |
*/ |
*/ |
361 |
public void setDateFormatSymbols(DateFormatSymbols formatData) |
public void setDateFormatSymbols(DateFormatSymbols formatData) |
362 |
{ |
{ |
363 |
|
if (formatData == null) |
364 |
|
{ |
365 |
|
throw new |
366 |
|
NullPointerException("The supplied format data was null."); |
367 |
|
} |
368 |
this.formatData = formatData; |
this.formatData = formatData; |
369 |
} |
} |
370 |
|
|
872 |
calendar.set(Calendar.YEAR, year - 80); |
calendar.set(Calendar.YEAR, year - 80); |
873 |
set2DigitYearStart(calendar.getTime()); |
set2DigitYearStart(calendar.getTime()); |
874 |
} |
} |
875 |
|
|
876 |
|
/** |
877 |
|
* Returns a copy of this instance of |
878 |
|
* <code>SimpleDateFormat</code>. The copy contains |
879 |
|
* clones of the formatting symbols and the 2-digit |
880 |
|
* year century start date. |
881 |
|
*/ |
882 |
|
public Object clone() |
883 |
|
{ |
884 |
|
SimpleDateFormat clone = (SimpleDateFormat) super.clone(); |
885 |
|
clone.setDateFormatSymbols((DateFormatSymbols) formatData.clone()); |
886 |
|
clone.set2DigitYearStart((Date) defaultCenturyStart.clone()); |
887 |
|
return clone; |
888 |
|
} |
889 |
|
|
890 |
} |
} |