當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。