當前位置: 首頁>>代碼示例>>Java>>正文


Java Locale.UK屬性代碼示例

本文整理匯總了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},
    };
}
 
開發者ID:AdoptOpenJDK,項目名稱:openjdk-jdk10,代碼行數:24,代碼來源:TCKLocalizedPrinterParser.java

示例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},
        };
    }
 
開發者ID:lambdalab-mirror,項目名稱:jdk8u-jdk,代碼行數:25,代碼來源:TCKLocalizedPrinterParser.java

示例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},
    };
}
 
開發者ID:lambdalab-mirror,項目名稱:jdk8u-jdk,代碼行數:13,代碼來源:TestTextPrinter.java

示例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));
}
 
開發者ID:Alfresco,項目名稱:alfresco-repository,代碼行數:8,代碼來源:MLAnaysisModeExpansionTest.java

示例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("", "", "")));
}
 
開發者ID:Alfresco,項目名稱:alfresco-repository,代碼行數:9,代碼來源:MLAnaysisModeExpansionTest.java

示例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("", "", "")));
}
 
開發者ID:Alfresco,項目名稱:alfresco-repository,代碼行數:8,代碼來源:MLAnaysisModeExpansionTest.java

示例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);
    }
}
 
開發者ID:AdoptOpenJDK,項目名稱:openjdk-jdk10,代碼行數:9,代碼來源:Bug8154797.java

示例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));
}
 
開發者ID:Alfresco,項目名稱:alfresco-repository,代碼行數:8,代碼來源:MLAnaysisModeExpansionTest.java

示例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("*", "", "")));
}
 
開發者ID:Alfresco,項目名稱:alfresco-repository,代碼行數:10,代碼來源:MLAnaysisModeExpansionTest.java

示例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("*", "", "")));
}
 
開發者ID:Alfresco,項目名稱:alfresco-repository,代碼行數:9,代碼來源:MLAnaysisModeExpansionTest.java

示例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", "")));
}
 
開發者ID:Alfresco,項目名稱:alfresco-repository,代碼行數:9,代碼來源:MLAnaysisModeExpansionTest.java

示例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", "")));
}
 
開發者ID:Alfresco,項目名稱:alfresco-repository,代碼行數:11,代碼來源:MLAnaysisModeExpansionTest.java

示例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 "";  
    }  
  
}
 
開發者ID:lonelyshine,項目名稱:xcx-specialty,代碼行數:18,代碼來源:JsonDateValueProcessor.java

示例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;
}
 
開發者ID:transwarpio,項目名稱:rapidminer,代碼行數:6,代碼來源:LicenseTools.java

示例15: initialValue

protected DateFormat initialValue() {
    SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd\'T\'HH:mmZ", Locale.UK);
    format.setTimeZone(TimeZone.getTimeZone("UTC"));
    return format;
}
 
開發者ID:transwarpio,項目名稱:rapidminer,代碼行數:5,代碼來源:NexusUtilities.java


注:本文中的java.util.Locale.UK屬性示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。