本文整理汇总了Java中java.util.Locale.UK属性的典型用法代码示例。如果您正苦于以下问题:Java Locale.UK属性的具体用法?Java Locale.UK怎么用?Java Locale.UK使用的例子?那么恭喜您, 这里精选的属性代码示例或许可以为您提供帮助。您也可以进一步了解该属性所在类java.util.Locale
的用法示例。
在下文中一共展示了Locale.UK属性的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: data_date
@DataProvider(name="date")
Object[][] data_date() {
return new Object[][] {
{LocalDate.of(2012, 6, 30), FormatStyle.SHORT, DateFormat.SHORT, Locale.UK},
{LocalDate.of(2012, 6, 30), FormatStyle.SHORT, DateFormat.SHORT, Locale.US},
{LocalDate.of(2012, 6, 30), FormatStyle.SHORT, DateFormat.SHORT, Locale.FRANCE},
{LocalDate.of(2012, 6, 30), FormatStyle.SHORT, DateFormat.SHORT, Locale.JAPAN},
{LocalDate.of(2012, 6, 30), FormatStyle.MEDIUM, DateFormat.MEDIUM, Locale.UK},
{LocalDate.of(2012, 6, 30), FormatStyle.MEDIUM, DateFormat.MEDIUM, Locale.US},
{LocalDate.of(2012, 6, 30), FormatStyle.MEDIUM, DateFormat.MEDIUM, Locale.FRANCE},
{LocalDate.of(2012, 6, 30), FormatStyle.MEDIUM, DateFormat.MEDIUM, Locale.JAPAN},
{LocalDate.of(2012, 6, 30), FormatStyle.LONG, DateFormat.LONG, Locale.UK},
{LocalDate.of(2012, 6, 30), FormatStyle.LONG, DateFormat.LONG, Locale.US},
{LocalDate.of(2012, 6, 30), FormatStyle.LONG, DateFormat.LONG, Locale.FRANCE},
{LocalDate.of(2012, 6, 30), FormatStyle.LONG, DateFormat.LONG, Locale.JAPAN},
{LocalDate.of(2012, 6, 30), FormatStyle.FULL, DateFormat.FULL, Locale.UK},
{LocalDate.of(2012, 6, 30), FormatStyle.FULL, DateFormat.FULL, Locale.US},
{LocalDate.of(2012, 6, 30), FormatStyle.FULL, DateFormat.FULL, Locale.FRANCE},
{LocalDate.of(2012, 6, 30), FormatStyle.FULL, DateFormat.FULL, Locale.JAPAN},
};
}
示例2: data_time
@DataProvider(name="time")
Object[][] data_time() {
return new Object[][] {
{LocalTime.of(11, 30), FormatStyle.SHORT, DateFormat.SHORT, Locale.UK},
{LocalTime.of(11, 30), FormatStyle.SHORT, DateFormat.SHORT, Locale.US},
{LocalTime.of(11, 30), FormatStyle.SHORT, DateFormat.SHORT, Locale.FRANCE},
{LocalTime.of(11, 30), FormatStyle.SHORT, DateFormat.SHORT, Locale.JAPAN},
{LocalTime.of(11, 30), FormatStyle.MEDIUM, DateFormat.MEDIUM, Locale.UK},
{LocalTime.of(11, 30), FormatStyle.MEDIUM, DateFormat.MEDIUM, Locale.US},
{LocalTime.of(11, 30), FormatStyle.MEDIUM, DateFormat.MEDIUM, Locale.FRANCE},
{LocalTime.of(11, 30), FormatStyle.MEDIUM, DateFormat.MEDIUM, Locale.JAPAN},
// these localized patterns include "z" which isn't available from LocalTime
// {LocalTime.of(11, 30), FormatStyle.LONG, DateFormat.LONG, Locale.UK},
// {LocalTime.of(11, 30), FormatStyle.LONG, DateFormat.LONG, Locale.US},
// {LocalTime.of(11, 30), FormatStyle.LONG, DateFormat.LONG, Locale.FRANCE},
// {LocalTime.of(11, 30), FormatStyle.LONG, DateFormat.LONG, Locale.JAPAN},
//
// {LocalTime.of(11, 30), FormatStyle.FULL, DateFormat.FULL, Locale.UK},
// {LocalTime.of(11, 30), FormatStyle.FULL, DateFormat.FULL, Locale.US},
// {LocalTime.of(11, 30), FormatStyle.FULL, DateFormat.FULL, Locale.FRANCE},
// {LocalTime.of(11, 30), FormatStyle.FULL, DateFormat.FULL, Locale.JAPAN},
};
}
示例3: providerDayOfWeekData
@DataProvider(name="print_DayOfWeekData")
Object[][] providerDayOfWeekData() {
return new Object[][] {
// Locale, pattern, expected text, input DayOfWeek
{Locale.US, "e", "1", DayOfWeek.SUNDAY},
{Locale.US, "ee", "01", DayOfWeek.SUNDAY},
{Locale.US, "c", "1", DayOfWeek.SUNDAY},
{Locale.UK, "e", "1", DayOfWeek.MONDAY},
{Locale.UK, "ee", "01", DayOfWeek.MONDAY},
{Locale.UK, "c", "1", DayOfWeek.MONDAY},
};
}
示例4: testIdentity
public void testIdentity()
{
Locale locale = Locale.UK;
HashSet<Locale> locales = new HashSet<Locale>();
locales.addAll(MLAnalysisMode.getLocales(MLAnalysisMode.LOCALE_ONLY, locale, false));
assertEquals(1, locales.size());
assertTrue(locales.contains(locale));
}
示例5: testIdentityAndAll
public void testIdentityAndAll()
{
Locale locale = Locale.UK;
HashSet<Locale> locales = new HashSet<Locale>();
locales.addAll(MLAnalysisMode.getLocales(MLAnalysisMode.LOCALE_AND_ALL, locale, false));
assertEquals(2, locales.size());
assertTrue(locales.contains(locale));
assertTrue(locales.contains(new Locale("", "", "")));
}
示例6: testAll
public void testAll()
{
Locale locale = Locale.UK;
HashSet<Locale> locales = new HashSet<Locale>();
locales.addAll(MLAnalysisMode.getLocales(MLAnalysisMode.ALL_ONLY, locale, false));
assertEquals(1, locales.size());
assertTrue(locales.contains(new Locale("", "", "")));
}
示例7: main
public static void main(String args[]) {
Bug8154797.generateExpectedValues();
Locale[] locArr = {new Locale("hi", "IN"), Locale.UK, new Locale("fi", "FI"),
Locale.ROOT, Locale.GERMAN, Locale.JAPANESE,
Locale.ENGLISH, Locale.FRANCE};
for (Locale loc : locArr) {
Bug8154797.compareResources(loc);
}
}
示例8: testIdentityWC
public void testIdentityWC()
{
Locale locale = Locale.UK;
HashSet<Locale> locales = new HashSet<Locale>();
locales.addAll(MLAnalysisMode.getLocales(MLAnalysisMode.LOCALE_ONLY, locale, true));
assertEquals(1, locales.size());
assertTrue(locales.contains(locale));
}
示例9: testIdentityAndAllWC
public void testIdentityAndAllWC()
{
Locale locale = Locale.UK;
HashSet<Locale> locales = new HashSet<Locale>();
locales.addAll(MLAnalysisMode.getLocales(MLAnalysisMode.LOCALE_AND_ALL, locale, true));
assertEquals(3, locales.size());
assertTrue(locales.contains(locale));
assertTrue(locales.contains(new Locale("", "", "")));
assertTrue(locales.contains(new Locale("*", "", "")));
}
示例10: testAllWC
public void testAllWC()
{
Locale locale = Locale.UK;
HashSet<Locale> locales = new HashSet<Locale>();
locales.addAll(MLAnalysisMode.getLocales(MLAnalysisMode.ALL_ONLY, locale, true));
assertEquals(2, locales.size());
assertTrue(locales.contains(new Locale("", "", "")));
assertTrue(locales.contains(new Locale("*", "", "")));
}
示例11: testContainingWC
public void testContainingWC()
{
Locale locale = Locale.UK;
HashSet<Locale> locales = new HashSet<Locale>();
locales.addAll(MLAnalysisMode.getLocales(MLAnalysisMode.LOCALE_AND_ALL_CONTAINING_LOCALES, locale, true));
assertEquals(2, locales.size());
assertTrue(locales.contains(new Locale("en", "", "")));
assertTrue(locales.contains(new Locale("en", "GB", "")));
}
示例12: testContainingAndAllWC
public void testContainingAndAllWC()
{
Locale locale = Locale.UK;
HashSet<Locale> locales = new HashSet<Locale>();
locales.addAll(MLAnalysisMode.getLocales(MLAnalysisMode.LOCALE_AND_ALL_CONTAINING_LOCALES_AND_ALL, locale, true));
assertEquals(4, locales.size());
assertTrue(locales.contains(new Locale("", "", "")));
assertTrue(locales.contains(new Locale("*", "", "")));
assertTrue(locales.contains(new Locale("en", "", "")));
assertTrue(locales.contains(new Locale("en", "GB", "")));
}
示例13: process
/**
* process
*
* @param value
* @return
*/
private Object process(Object value) {
try {
if (value instanceof Date) {
SimpleDateFormat sdf = new SimpleDateFormat(datePattern, Locale.UK);
return sdf.format((Date) value);
}
return value == null ? "" : value.toString();
} catch (Exception e) {
return "";
}
}
示例14: initialValue
@Override
protected DateFormat initialValue() {
DateFormat format = new SimpleDateFormat("yyyy-MM-dd'T'HH:mmXXX", Locale.UK);
format.setTimeZone(TimeZone.getTimeZone("UTC"));
return format;
}
示例15: initialValue
protected DateFormat initialValue() {
SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd\'T\'HH:mmZ", Locale.UK);
format.setTimeZone(TimeZone.getTimeZone("UTC"));
return format;
}