当前位置: 首页>>代码示例>>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;未经允许,请勿转载。