src/share/classes/sun/util/calendar/ZoneInfo.java

Print this page




 544      * Returns a string representation of this time zone.
 545      * @return the string
 546      */
 547     public String toString() {
 548         return getClass().getName() +
 549             "[id=\"" + getID() + "\"" +
 550             ",offset=" + getLastRawOffset() +
 551             ",dstSavings=" + dstSavings +
 552             ",useDaylight=" + useDaylightTime() +
 553             ",transitions=" + ((transitions != null) ? transitions.length : 0) +
 554             ",lastRule=" + (lastRule == null ? getLastRuleInstance() : lastRule) +
 555             "]";
 556     }
 557 
 558     /**
 559      * Gets all available IDs supported in the Java run-time.
 560      *
 561      * @return an array of time zone IDs.
 562      */
 563     public static String[] getAvailableIDs() {
 564         Set<String> idSet = ZoneInfoFile.getZoneIds();
 565         return idSet.toArray(new String[idSet.size()]);
 566     }
 567 
 568     /**
 569      * Gets all available IDs that have the same value as the
 570      * specified raw GMT offset.
 571      *
 572      * @param rawOffset the GMT offset in milliseconds. This
 573      * value should not include any daylight saving time.
 574      *
 575      * @return an array of time zone IDs.
 576      */
 577     public static String[] getAvailableIDs(int rawOffset) {
 578         return ZoneInfoFile.getZoneIds(rawOffset);
 579     }
 580 
 581     /**
 582      * Gets the ZoneInfo for the given ID.
 583      *
 584      * @param ID the ID for a ZoneInfo. See TimeZone for detail.
 585      *




 544      * Returns a string representation of this time zone.
 545      * @return the string
 546      */
 547     public String toString() {
 548         return getClass().getName() +
 549             "[id=\"" + getID() + "\"" +
 550             ",offset=" + getLastRawOffset() +
 551             ",dstSavings=" + dstSavings +
 552             ",useDaylight=" + useDaylightTime() +
 553             ",transitions=" + ((transitions != null) ? transitions.length : 0) +
 554             ",lastRule=" + (lastRule == null ? getLastRuleInstance() : lastRule) +
 555             "]";
 556     }
 557 
 558     /**
 559      * Gets all available IDs supported in the Java run-time.
 560      *
 561      * @return an array of time zone IDs.
 562      */
 563     public static String[] getAvailableIDs() {
 564         return ZoneInfoFile.getZoneIds();

 565     }
 566 
 567     /**
 568      * Gets all available IDs that have the same value as the
 569      * specified raw GMT offset.
 570      *
 571      * @param rawOffset the GMT offset in milliseconds. This
 572      * value should not include any daylight saving time.
 573      *
 574      * @return an array of time zone IDs.
 575      */
 576     public static String[] getAvailableIDs(int rawOffset) {
 577         return ZoneInfoFile.getZoneIds(rawOffset);
 578     }
 579 
 580     /**
 581      * Gets the ZoneInfo for the given ID.
 582      *
 583      * @param ID the ID for a ZoneInfo. See TimeZone for detail.
 584      *