}
}
- protected static Date getDateFromStringByParameters(String x, String inputDateFormat, Locale inputLocale, TimeZone inputTimeZone) throws MInvalidConversionFormatException {
+ protected static Date createDateFromString(String x, String inputDateFormat, Locale inputLocale, TimeZone inputTimeZone) throws MInvalidConversionFormatException {
if (MText.isBlank(x)) {
throw new IllegalArgumentException("Invalid 'x': null or empty.");
}
return d2;
}
- protected static String getStringFromDateByParameters(Date date, String outputDateFormat, Locale outputLocale, TimeZone outputTimeZone) {
+ protected static String createStringFromDate(Date date, String outputDateFormat, Locale outputLocale, TimeZone outputTimeZone) {
if (null == date) {
throw new IllegalArgumentException("Invalid 'date': null.");
}
return sdf.format(date);
}
- public Date getDateFromString(String x) throws MInvalidConversionFormatException {
+ public Date createDateFromString(String x) throws MInvalidConversionFormatException {
Date y = null;
for (String dateFormat: this.getDateFormats()) {
try {
- y = MDateConverter.getDateFromStringByParameters(x, dateFormat, this.getLocale(), this.getTimeZone());
+ y = MDateConverter.createDateFromString(x, dateFormat, this.getLocale(), this.getTimeZone());
//
return y;
}
return y; // necessary to avoid Java compilation errors
}
- public String getStringFromDate(Date x) {
- return MDateConverter.getStringFromDateByParameters(x, this.getDefaultDateFormat(), this.getLocale(), this.getTimeZone());
+ public String createStringFromDate(Date x) {
+ return MDateConverter.createStringFromDate(x, this.getDefaultDateFormat(), this.getLocale(), this.getTimeZone());
}
/* Helpers. */
}
}
- protected static LocalDate getDateFromStringByParameters(String x, String inputDateFormat, Locale inputLocale) throws MInvalidConversionFormatException {
+ protected static LocalDate createDateFromString(String x, String inputDateFormat, Locale inputLocale) throws MInvalidConversionFormatException {
if (MText.isBlank(x)) {
throw new IllegalArgumentException("Invalid 'x': null or empty.");
}
return d;
}
- protected static String getStringFromDateByParameters(LocalDate date, String outputDateFormat, Locale outputLocale) {
+ protected static String createStringFromDate(LocalDate date, String outputDateFormat, Locale outputLocale) {
if (null == date) {
throw new IllegalArgumentException("Invalid 'date': null.");
}
return date.format(DateTimeFormatter.ofPattern(outputDateFormat, outputLocale).withResolverStyle(ResolverStyle.STRICT));
}
- public LocalDate getDateFromString(String x) throws MInvalidConversionFormatException {
+ public LocalDate createDateFromString(String x) throws MInvalidConversionFormatException {
LocalDate y = null;
for (String dateFormat: this.getDateFormats()) {
try {
- y = MLocalDateConverter.getDateFromStringByParameters(x, dateFormat, this.getLocale());
+ y = MLocalDateConverter.createDateFromString(x, dateFormat, this.getLocale());
//
return y;
}
return y; // necessary to avoid Java compilation errors
}
- public String getStringFromDate(LocalDate x) {
- return MLocalDateConverter.getStringFromDateByParameters(x, this.getDefaultDateFormat(), this.getLocale());
+ public String createStringFromDate(LocalDate x) {
+ return MLocalDateConverter.createStringFromDate(x, this.getDefaultDateFormat(), this.getLocale());
}
}
}
}
- protected static LocalDateTime getDatetimeFromStringByParameters(String x, String inputDatetimeFormat, Locale inputLocale) throws MInvalidConversionFormatException {
+ protected static LocalDateTime createDatetimeFromString(String x, String inputDatetimeFormat, Locale inputLocale) throws MInvalidConversionFormatException {
if (MText.isBlank(x)) {
throw new IllegalArgumentException("Invalid 'x': null or empty.");
}
return dt;
}
- protected static String getStringFromDatetimeByParameters(LocalDateTime datetime, String outputDatetimeFormat, Locale outputLocale) {
+ protected static String createStringFromDatetime(LocalDateTime datetime, String outputDatetimeFormat, Locale outputLocale) {
if (null == datetime) {
throw new IllegalArgumentException("Invalid 'datetime': null.");
}
return datetime.format(DateTimeFormatter.ofPattern(outputDatetimeFormat, outputLocale).withResolverStyle(ResolverStyle.STRICT));
}
- public LocalDateTime getDatetimeFromString(String x) throws MInvalidConversionFormatException {
+ public LocalDateTime createDatetimeFromString(String x) throws MInvalidConversionFormatException {
LocalDateTime y = null;
for (String datetimeFormat: this.getDatetimeFormats()) {
try {
- y = MLocalDateTimeConverter.getDatetimeFromStringByParameters(x, datetimeFormat, this.getLocale());
+ y = MLocalDateTimeConverter.createDatetimeFromString(x, datetimeFormat, this.getLocale());
//
return y;
}
return y; // necessary to avoid Java compilation errors
}
- public String getStringFromDatetime(LocalDateTime x) {
- return MLocalDateTimeConverter.getStringFromDatetimeByParameters(x, this.getDefaultDatetimeFormat(), this.getLocale());
+ public String createStringFromDatetime(LocalDateTime x) {
+ return MLocalDateTimeConverter.createStringFromDatetime(x, this.getDefaultDatetimeFormat(), this.getLocale());
}
}
}
}
- protected static BigDecimal getNumberFromStringByParameters(String x, String inputNumberFormat, Locale inputLocale) throws MInvalidConversionFormatException {
+ protected static BigDecimal createNumberFromString(String x, String inputNumberFormat, Locale inputLocale) throws MInvalidConversionFormatException {
if (MText.isBlank(x)) {
throw new IllegalArgumentException("Invalid 'x': null or empty.");
}
return bd;
}
- protected static String getStringFromNumberByParameters(BigDecimal number, String outputNumberFormat, Locale outputLocale) {
+ protected static String createStringFromNumber(BigDecimal number, String outputNumberFormat, Locale outputLocale) {
if (null == number) {
throw new IllegalArgumentException("Invalid 'number': null.");
}
return df.format(number);
}
- public BigDecimal getNumberFromString(String x) throws MInvalidConversionFormatException {
+ public BigDecimal createNumberFromString(String x) throws MInvalidConversionFormatException {
BigDecimal y = null;
for (String numberFormat: this.getNumberFormats()) {
try {
- y = MNumberConverter.getNumberFromStringByParameters(x, numberFormat, this.getLocale());
+ y = MNumberConverter.createNumberFromString(x, numberFormat, this.getLocale());
//
return y;
}
return y; // necessary to avoid Java compilation errors
}
- public String getStringFromNumber(BigDecimal x) {
- return MNumberConverter.getStringFromNumberByParameters(x, this.getDefaultNumberFormat(), this.getLocale());
+ public String createStringFromNumber(BigDecimal x) {
+ return MNumberConverter.createStringFromNumber(x, this.getDefaultNumberFormat(), this.getLocale());
}
}