class DataFormat {

    @NonNull
    public DateFormat newDateFormat() throws IllegalArgumentException {
        DateFormat result = !datePattern.isEmpty()
                ? new SimpleDateFormat(datePattern, getLocaleOrDefault())
                : SimpleDateFormat.getDateInstance(DateFormat.DEFAULT, getLocaleOrDefault());
        result.setLenient(datePattern.isEmpty() && locale == null);
        return result;
    }

    private  DataFormat(Locale locale, String datePattern, String numberPattern, Void fake);
    @Deprecated public  DataFormat(@Nullable Locale locale, @Nullable String datePattern);
    @Deprecated public  DataFormat(@Nullable Locale locale, @Nullable String datePattern, @Nullable String numberPattern);

}