当前位置: 首页>>代码示例>>Java>>正文


Java Locale.TAIWAN属性代码示例

本文整理汇总了Java中java.util.Locale.TAIWAN属性的典型用法代码示例。如果您正苦于以下问题:Java Locale.TAIWAN属性的具体用法?Java Locale.TAIWAN怎么用?Java Locale.TAIWAN使用的例子?那么, 这里精选的属性代码示例或许可以为您提供帮助。您也可以进一步了解该属性所在java.util.Locale的用法示例。


在下文中一共展示了Locale.TAIWAN属性的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: getFormattedString

public String getFormattedString() {
    StringBuilder sb = new StringBuilder();
    if (getApkCertificateDigestSha256().length > 0) {
        sb.append("[");
        for (String s : getApkCertificateDigestSha256()) {
            sb.append(s);
            sb.append(", ");
        }
        sb.delete(sb.length() - 2, sb.length());
        sb.append("]");
    }
    SimpleDateFormat newFormat = new SimpleDateFormat(
            "yyyy/MM/dd hh:mm:ss", Locale.TAIWAN);
    String formattedTime = newFormat.format(getTimestampMs());
    return String
            .format("Request Time:\n%s\n\nNonce:\n%s\n\nPackageName:\n%s\n\nextension:\n%s\n\nApkCertificateDigestSha256:\n%s\n\nApkDigestSha256:\n%s\n\nctsProfileMatch:\n%s\n\nbasicIntegrity:\n%s",
                    formattedTime, getNonce(), getApkPackageName(),
                    getExtension(), sb.toString(), getApkDigestSha256(),
                    isCtsProfileMatch(), isBasicIntegrity());
}
 
开发者ID:Catherine22,项目名称:SecuritySample,代码行数:20,代码来源:AttestationResult.java

示例2: formatData

@DataProvider(name="format_data")
Object[][] formatData() {
    return new Object[][] {
        // Chronology, Format Locale, Numbering Locale, ChronoLocalDate, expected string
        { JAPANESE, Locale.JAPANESE, Locale.JAPANESE, JAPANESE.date(IsoDate),
          "\u5e73\u621025\u5e742\u670811\u65e5" }, // Japanese Heisei 25-02-11
        { HIJRAH, ARABIC, ARABIC, HIJRAH.date(IsoDate),
          "\u0627\u0644\u0627\u062b\u0646\u064a\u0646\u060c 1 \u0631\u0628\u064a\u0639 "
          + "\u0627\u0644\u0622\u062e\u0631 1434" }, // Hijrah AH 1434-04-01 (Mon)
        { MINGUO, Locale.TAIWAN, Locale.TAIWAN, MINGUO.date(IsoDate),
          "\u6c11\u570b102\u5e742\u670811\u65e5\u661f\u671f\u4e00" }, // Minguo ROC 102-02-11 (Mon)
        { BUDDHIST, thTH, thTH, BUDDHIST.date(IsoDate),
          "\u0e27\u0e31\u0e19\u0e08\u0e31\u0e19\u0e17\u0e23\u0e4c\u0e17\u0e35\u0e48"
          + " 11 \u0e01\u0e38\u0e21\u0e20\u0e32\u0e1e\u0e31\u0e19\u0e18\u0e4c"
          + " \u0e1e.\u0e28. 2556" }, // ThaiBuddhist BE 2556-02-11
        { BUDDHIST, thTH, thTHTH, BUDDHIST.date(IsoDate),
          "\u0e27\u0e31\u0e19\u0e08\u0e31\u0e19\u0e17\u0e23\u0e4c\u0e17\u0e35\u0e48 \u0e51\u0e51 "
          + "\u0e01\u0e38\u0e21\u0e20\u0e32\u0e1e\u0e31\u0e19\u0e18\u0e4c \u0e1e.\u0e28. "
          + "\u0e52\u0e55\u0e55\u0e56" }, // ThaiBuddhist BE 2556-02-11 (with Thai digits)
    };
}
 
开发者ID:lambdalab-mirror,项目名称:jdk8u-jdk,代码行数:21,代码来源:TestNonIsoFormatter.java

示例3: formatData

@DataProvider(name="format_data")
Object[][] formatData() {
    return new Object[][] {
        // Chronology, Format Locale, Numbering Locale, ChronoLocalDate, expected string
        { JAPANESE, Locale.JAPANESE, Locale.JAPANESE, JAPANESE.date(IsoDate),
          "\u5e73\u621025\u5e742\u670811\u65e5\u6708\u66dc\u65e5" }, // Japanese Heisei 25-02-11
        { HIJRAH, ARABIC, ARABIC, HIJRAH.date(IsoDate),
          "\u0627\u0644\u0627\u062b\u0646\u064a\u0646\u060c \u0661 \u0631\u0628\u064a\u0639 "
          + "\u0627\u0644\u0622\u062e\u0631\u060c \u0661\u0664\u0663\u0664 \u0647\u0640" }, // Hijrah AH 1434-04-01 (Mon)
        { MINGUO, Locale.TAIWAN, Locale.TAIWAN, MINGUO.date(IsoDate),
          "\u6c11\u570b102\u5e742\u670811\u65e5 \u661f\u671f\u4e00" }, // Minguo ROC 102-02-11 (Mon)
        { BUDDHIST, thTH, thTH, BUDDHIST.date(IsoDate),
          "\u0e27\u0e31\u0e19\u0e08\u0e31\u0e19\u0e17\u0e23\u0e4c\u0e17\u0e35\u0e48"
          + " 11 \u0e01\u0e38\u0e21\u0e20\u0e32\u0e1e\u0e31\u0e19\u0e18\u0e4c"
          + " \u0e1e.\u0e28. 2556" }, // ThaiBuddhist BE 2556-02-11
        { BUDDHIST, thTH, thTHTH, BUDDHIST.date(IsoDate),
          "\u0e27\u0e31\u0e19\u0e08\u0e31\u0e19\u0e17\u0e23\u0e4c\u0e17\u0e35\u0e48 \u0e51\u0e51 "
          + "\u0e01\u0e38\u0e21\u0e20\u0e32\u0e1e\u0e31\u0e19\u0e18\u0e4c \u0e1e.\u0e28. "
          + "\u0e52\u0e55\u0e55\u0e56" }, // ThaiBuddhist BE 2556-02-11 (with Thai digits)
    };
}
 
开发者ID:AdoptOpenJDK,项目名称:openjdk-jdk10,代码行数:21,代码来源:TestNonIsoFormatter.java

示例4: switchLanguage

protected void switchLanguage(String lang) {
    Resources resources = getResources();
    Configuration configuration = resources.getConfiguration();
    DisplayMetrics displayMetrics = resources.getDisplayMetrics();
    switch (lang) {
        case "zh":
            configuration.locale = Locale.TAIWAN;
            break;
        case "ja":
            configuration.locale = Locale.JAPAN;
            break;
        default:
            configuration.locale = Locale.ENGLISH;
            break;
    }

    resources.updateConfiguration(configuration, displayMetrics);
    /*  避免重複寫入
    MainApplication.writeSetting("uiLang", lang);
    //*/
}
 
开发者ID:kamisakihideyoshi,项目名称:TaipeiTechRefined,代码行数:21,代码来源:MainActivity.java

示例5: switchLanguage

protected void switchLanguage(String lang) {
    Resources resources = getResources();
    Configuration configuration = resources.getConfiguration();
    DisplayMetrics displayMetrics = resources.getDisplayMetrics();
    switch (lang) {
        case "zh":
            configuration.locale = Locale.TAIWAN;
            break;
        case "ja":
            configuration.locale = Locale.JAPAN;
            break;
        default:
            configuration.locale = Locale.ENGLISH;
            break;
    }

    resources.updateConfiguration(configuration, displayMetrics);
    MainApplication.writeSetting("uiLang", lang);
    //*
    getActivity().finish();
    getActivity().startActivity(getActivity().getIntent());
    //*/
}
 
开发者ID:kamisakihideyoshi,项目名称:TaipeiTechRefined,代码行数:23,代码来源:EtcFragment.java

示例6: isSharedFlyweight

private static boolean isSharedFlyweight(Object obj) {
    if (obj == null) {
        return true;
    }
    if (obj == Boolean.TRUE || obj == Boolean.FALSE) {
        return true;
    }
    if (/* obj == Locale.ROOT || *//* Java 6 */
    obj == Locale.ENGLISH || obj == Locale.FRENCH || obj == Locale.GERMAN || obj == Locale.ITALIAN
            || obj == Locale.JAPANESE || obj == Locale.KOREAN || obj == Locale.CHINESE
            || obj == Locale.SIMPLIFIED_CHINESE || obj == Locale.TRADITIONAL_CHINESE || obj == Locale.FRANCE
            || obj == Locale.GERMANY || obj == Locale.ITALY || obj == Locale.JAPAN || obj == Locale.KOREA
            || obj == Locale.CHINA || obj == Locale.PRC || obj == Locale.TAIWAN || obj == Locale.UK
            || obj == Locale.US || obj == Locale.CANADA || obj == Locale.CANADA_FRENCH) {
        return true;
    }
    if (obj == Collections.EMPTY_SET || obj == Collections.EMPTY_LIST || obj == Collections.EMPTY_MAP) {
        return true;
    }
    if (obj == BigInteger.ZERO || obj == BigInteger.ONE) {
        return true;
    }
    if (obj == System.in || obj == System.out || obj == System.err) {
        return true;
    }
    if (obj == String.CASE_INSENSITIVE_ORDER) {
        return true;
    }
    if (obj == JarFile.MANIFEST_NAME) {
        return true;
    }
    return false;
}
 
开发者ID:luoyaogui,项目名称:otter-G,代码行数:33,代码来源:ObjectProfiler.java

示例7: getDateString

public static String getDateString(String format, Date date, Context context) {
    SimpleDateFormat sdf = new SimpleDateFormat(format, Locale.TAIWAN);
    DateFormatSymbols dfs = new DateFormatSymbols();
    dfs.setShortWeekdays(new String[]{"", context.getString(R.string.Su), context.getString(R.string.Mo), context.getString(R.string.Tu), context.getString(R.string.We), context.getString(R.string.Th), context.getString(R.string.Fr),
            context.getString(R.string.Sa)});
    sdf.setDateFormatSymbols(dfs);
    return sdf.format(date);
}
 
开发者ID:kamisakihideyoshi,项目名称:TaipeiTechRefined,代码行数:8,代码来源:Utility.java

示例8: MyResourcesAsia

public MyResourcesAsia() {
    super("java.properties", "asia",
          Locale.JAPANESE, Locale.JAPAN, Locale.CHINESE, Locale.TAIWAN,
          new Locale("vi"));
}
 
开发者ID:AdoptOpenJDK,项目名称:openjdk-jdk10,代码行数:5,代码来源:MyResourcesAsia.java

示例9: getDate

public static Date getDate(String date_string) throws ParseException {
    SimpleDateFormat sdf = new SimpleDateFormat("yyyy/MM/dd", Locale.TAIWAN);
    Date date = sdf.parse(date_string);
    return date;
}
 
开发者ID:kamisakihideyoshi,项目名称:TaipeiTechRefined,代码行数:5,代码来源:YearCalendar.java


注:本文中的java.util.Locale.TAIWAN属性示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。