throw new IllegalArgumentException("Invalid 'dateFormats': null.");
}
else {
- Iterator i = dateFormats.iterator();
+ Iterator<String> i = dateFormats.iterator();
while (i.hasNext()) {
- MDateConverter.checkDateFormat((String)i.next());
+ MDateConverter.checkDateFormat(i.next());
}
}
//
Date y = null;
for (String dateFormat: this.getDateFormats()) {
try {
- y = this.getDateFromStringByParameters(x, dateFormat, this.getLocale(), this.getTimeZone());
+ y = MDateConverter.getDateFromStringByParameters(x, dateFormat, this.getLocale(), this.getTimeZone());
return y;
}
catch (MInvalidConversionFormatException exception) {
}
public String getStringFromDate(Date x) {
- return this.getStringFromDateByParameters(x, this.getDefaultDateFormat(), this.getLocale(), this.getTimeZone());
+ return MDateConverter.getStringFromDateByParameters(x, this.getDefaultDateFormat(), this.getLocale(), this.getTimeZone());
}
/* Helpers. */
throw new IllegalArgumentException("Invalid 'numberFormats': null.");
}
else {
- Iterator i = numberFormats.iterator();
+ Iterator<String> i = numberFormats.iterator();
while (i.hasNext()) {
- MNumberConverter.checkNumberFormat((String)i.next());
+ MNumberConverter.checkNumberFormat(i.next());
}
}
//
BigDecimal y = null;
for (String numberFormat: this.getNumberFormats()) {
try {
- y = this.getNumberFromStringByParameters(x, numberFormat, this.getLocale());
+ y = MNumberConverter.getNumberFromStringByParameters(x, numberFormat, this.getLocale());
return y;
}
catch (MInvalidConversionFormatException exception) {
}
public String getStringFromNumber(BigDecimal x) {
- return this.getStringFromNumberByParameters(x, this.getDefaultNumberFormat(), this.getLocale());
+ return MNumberConverter.getStringFromNumberByParameters(x, this.getDefaultNumberFormat(), this.getLocale());
}
}