@Test public void format日付テスト() { String format = "%4$2s %3$2s %2$2s %1$2s"; String expected = " d c b a"; String actual = Formats.format(format, "a", "b", "c", "d"); assertEquals(expected, actual); }
public static String format(String format, Object... args) { return format(format, Locale.getDefault(), args); }
Formats { public static String format(String format, Object... args) { return format(format, Locale.getDefault(), args); } }
Formats { public static String format(String format, Object... args) { return format(format, Locale.getDefault(), args); } private  Formats(); }
Formats { public static String format(String format, Object... args) { return format(format, Locale.getDefault(), args); } private  Formats(); static String simpleDateFormat(Date date, String pattern); static String format(String format, Object... args); @SuppressWarnings("resource") static String format(String format, Locale locale, Object... args); }
Formats { public static String format(String format, Object... args) { return format(format, Locale.getDefault(), args); } private  Formats(); static String simpleDateFormat(Date date, String pattern); static String format(String format, Object... args); @SuppressWarnings("resource") static String format(String format, Locale locale, Object... args);  }