gpt4 book ai didi

libcore.util.ZoneInfoDB.getInstance()方法的使用及代码示例

转载 作者:知者 更新时间:2024-03-14 18:43:31 28 4
gpt4 key购买 nike

本文整理了Java中libcore.util.ZoneInfoDB.getInstance()方法的一些代码示例,展示了ZoneInfoDB.getInstance()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。ZoneInfoDB.getInstance()方法的具体详情如下:
包路径:libcore.util.ZoneInfoDB
类名称:ZoneInfoDB
方法名:getInstance

ZoneInfoDB.getInstance介绍

暂无

代码示例

代码示例来源:origin: robovm/robovm

/**
 * Returns the system's installed time zone IDs. Any of these IDs can be
 * passed to {@link #getTimeZone} to lookup the corresponding time zone
 * instance.
 */
public static synchronized String[] getAvailableIDs() {
  return ZoneInfoDB.getInstance().getAvailableIDs();
}

代码示例来源:origin: robovm/robovm

/**
 * Returns the IDs of the time zones whose offset from UTC is {@code
 * offsetMillis}. Any of these IDs can be passed to {@link #getTimeZone} to
 * lookup the corresponding time zone instance.
 *
 * @return a possibly-empty array.
 */
public static synchronized String[] getAvailableIDs(int offsetMillis) {
  return ZoneInfoDB.getInstance().getAvailableIDs(offsetMillis);
}

代码示例来源:origin: robovm/robovm

/**
 * Returns an array containing the time zone ids in use in the country corresponding to
 * the given locale. This is not necessary for Java API, but is used by telephony as a
 * fallback. We retrieve these strings from zone.tab rather than icu4c because the latter
 * supplies them in alphabetical order where zone.tab has them in a kind of "importance"
 * order (as defined in the zone.tab header).
 */
public static String[] forLocale(Locale locale) {
  String countryCode = locale.getCountry();
  ArrayList<String> ids = new ArrayList<String>();
  for (String line : ZoneInfoDB.getInstance().getZoneTab().split("\n")) {
    if (line.startsWith(countryCode)) {
      int olsonIdStart = line.indexOf('\t', 4) + 1;
      int olsonIdEnd = line.indexOf('\t', olsonIdStart);
      if (olsonIdEnd == -1) {
        olsonIdEnd = line.length(); // Not all zone.tab lines have a comment.
      }
      ids.add(line.substring(olsonIdStart, olsonIdEnd));
    }
  }
  return ids.toArray(new String[ids.size()]);
}

代码示例来源:origin: robovm/robovm

zoneName = ZoneInfoDB.getInstance().getDefaultID();

代码示例来源:origin: robovm/robovm

zone = ZoneInfoDB.getInstance().makeTimeZone(id);
} catch (IOException ignored) {

代码示例来源:origin: ibinti/bugvm

/**
 * Returns the IDs of the time zones whose offset from UTC is {@code
 * offsetMillis}. Any of these IDs can be passed to {@link #getTimeZone} to
 * lookup the corresponding time zone instance.
 *
 * @return a possibly-empty array.
 */
public static synchronized String[] getAvailableIDs(int offsetMillis) {
  return ZoneInfoDB.getInstance().getAvailableIDs(offsetMillis);
}

代码示例来源:origin: MobiVM/robovm

/**
 * Returns the system's installed time zone IDs. Any of these IDs can be
 * passed to {@link #getTimeZone} to lookup the corresponding time zone
 * instance.
 */
public static synchronized String[] getAvailableIDs() {
  return ZoneInfoDB.getInstance().getAvailableIDs();
}

代码示例来源:origin: com.bugvm/bugvm-rt

/**
 * Returns the IDs of the time zones whose offset from UTC is {@code
 * offsetMillis}. Any of these IDs can be passed to {@link #getTimeZone} to
 * lookup the corresponding time zone instance.
 *
 * @return a possibly-empty array.
 */
public static synchronized String[] getAvailableIDs(int offsetMillis) {
  return ZoneInfoDB.getInstance().getAvailableIDs(offsetMillis);
}

代码示例来源:origin: MobiVM/robovm

/**
 * Returns the IDs of the time zones whose offset from UTC is {@code
 * offsetMillis}. Any of these IDs can be passed to {@link #getTimeZone} to
 * lookup the corresponding time zone instance.
 *
 * @return a possibly-empty array.
 */
public static synchronized String[] getAvailableIDs(int offsetMillis) {
  return ZoneInfoDB.getInstance().getAvailableIDs(offsetMillis);
}

代码示例来源:origin: FlexoVM/flexovm

/**
 * Returns the system's installed time zone IDs. Any of these IDs can be
 * passed to {@link #getTimeZone} to lookup the corresponding time zone
 * instance.
 */
public static synchronized String[] getAvailableIDs() {
  return ZoneInfoDB.getInstance().getAvailableIDs();
}

代码示例来源:origin: ibinti/bugvm

/**
 * Returns the system's installed time zone IDs. Any of these IDs can be
 * passed to {@link #getTimeZone} to lookup the corresponding time zone
 * instance.
 */
public static synchronized String[] getAvailableIDs() {
  return ZoneInfoDB.getInstance().getAvailableIDs();
}

代码示例来源:origin: com.mobidevelop.robovm/robovm-rt

/**
 * Returns the system's installed time zone IDs. Any of these IDs can be
 * passed to {@link #getTimeZone} to lookup the corresponding time zone
 * instance.
 */
public static synchronized String[] getAvailableIDs() {
  return ZoneInfoDB.getInstance().getAvailableIDs();
}

代码示例来源:origin: com.mobidevelop.robovm/robovm-rt

/**
 * Returns the IDs of the time zones whose offset from UTC is {@code
 * offsetMillis}. Any of these IDs can be passed to {@link #getTimeZone} to
 * lookup the corresponding time zone instance.
 *
 * @return a possibly-empty array.
 */
public static synchronized String[] getAvailableIDs(int offsetMillis) {
  return ZoneInfoDB.getInstance().getAvailableIDs(offsetMillis);
}

代码示例来源:origin: com.bugvm/bugvm-rt

/**
 * Returns the system's installed time zone IDs. Any of these IDs can be
 * passed to {@link #getTimeZone} to lookup the corresponding time zone
 * instance.
 */
public static synchronized String[] getAvailableIDs() {
  return ZoneInfoDB.getInstance().getAvailableIDs();
}

代码示例来源:origin: com.gluonhq/robovm-rt

/**
 * Returns the system's installed time zone IDs. Any of these IDs can be
 * passed to {@link #getTimeZone} to lookup the corresponding time zone
 * instance.
 */
public static synchronized String[] getAvailableIDs() {
  return ZoneInfoDB.getInstance().getAvailableIDs();
}

代码示例来源:origin: com.gluonhq/robovm-rt

/**
 * Returns the IDs of the time zones whose offset from UTC is {@code
 * offsetMillis}. Any of these IDs can be passed to {@link #getTimeZone} to
 * lookup the corresponding time zone instance.
 *
 * @return a possibly-empty array.
 */
public static synchronized String[] getAvailableIDs(int offsetMillis) {
  return ZoneInfoDB.getInstance().getAvailableIDs(offsetMillis);
}

代码示例来源:origin: FlexoVM/flexovm

/**
 * Returns the IDs of the time zones whose offset from UTC is {@code
 * offsetMillis}. Any of these IDs can be passed to {@link #getTimeZone} to
 * lookup the corresponding time zone instance.
 *
 * @return a possibly-empty array.
 */
public static synchronized String[] getAvailableIDs(int offsetMillis) {
  return ZoneInfoDB.getInstance().getAvailableIDs(offsetMillis);
}

代码示例来源:origin: ibinti/bugvm

/**
 * Returns an array containing the time zone ids in use in the country corresponding to
 * the given locale. This is not necessary for Java API, but is used by telephony as a
 * fallback. We retrieve these strings from zone.tab rather than icu4c because the latter
 * supplies them in alphabetical order where zone.tab has them in a kind of "importance"
 * order (as defined in the zone.tab header).
 */
public static String[] forLocale(Locale locale) {
  String countryCode = locale.getCountry();
  ArrayList<String> ids = new ArrayList<String>();
  for (String line : ZoneInfoDB.getInstance().getZoneTab().split("\n")) {
    if (line.startsWith(countryCode)) {
      int olsonIdStart = line.indexOf('\t', 4) + 1;
      int olsonIdEnd = line.indexOf('\t', olsonIdStart);
      if (olsonIdEnd == -1) {
        olsonIdEnd = line.length(); // Not all zone.tab lines have a comment.
      }
      ids.add(line.substring(olsonIdStart, olsonIdEnd));
    }
  }
  return ids.toArray(new String[ids.size()]);
}

代码示例来源:origin: MobiVM/robovm

/**
 * Returns an array containing the time zone ids in use in the country corresponding to
 * the given locale. This is not necessary for Java API, but is used by telephony as a
 * fallback. We retrieve these strings from zone.tab rather than icu4c because the latter
 * supplies them in alphabetical order where zone.tab has them in a kind of "importance"
 * order (as defined in the zone.tab header).
 */
public static String[] forLocale(Locale locale) {
  String countryCode = locale.getCountry();
  ArrayList<String> ids = new ArrayList<String>();
  for (String line : ZoneInfoDB.getInstance().getZoneTab().split("\n")) {
    if (line.startsWith(countryCode)) {
      int olsonIdStart = line.indexOf('\t', 4) + 1;
      int olsonIdEnd = line.indexOf('\t', olsonIdStart);
      if (olsonIdEnd == -1) {
        olsonIdEnd = line.length(); // Not all zone.tab lines have a comment.
      }
      ids.add(line.substring(olsonIdStart, olsonIdEnd));
    }
  }
  return ids.toArray(new String[ids.size()]);
}

代码示例来源:origin: com.bugvm/bugvm-rt

/**
 * Returns an array containing the time zone ids in use in the country corresponding to
 * the given locale. This is not necessary for Java API, but is used by telephony as a
 * fallback. We retrieve these strings from zone.tab rather than icu4c because the latter
 * supplies them in alphabetical order where zone.tab has them in a kind of "importance"
 * order (as defined in the zone.tab header).
 */
public static String[] forLocale(Locale locale) {
  String countryCode = locale.getCountry();
  ArrayList<String> ids = new ArrayList<String>();
  for (String line : ZoneInfoDB.getInstance().getZoneTab().split("\n")) {
    if (line.startsWith(countryCode)) {
      int olsonIdStart = line.indexOf('\t', 4) + 1;
      int olsonIdEnd = line.indexOf('\t', olsonIdStart);
      if (olsonIdEnd == -1) {
        olsonIdEnd = line.length(); // Not all zone.tab lines have a comment.
      }
      ids.add(line.substring(olsonIdStart, olsonIdEnd));
    }
  }
  return ids.toArray(new String[ids.size()]);
}

28 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com