jdk/test/sun/util/calendar/zi/Mappings.java
author sherman
Tue, 12 Feb 2013 09:25:43 -0800
changeset 15658 55b829ca2334
child 23010 6dadb192ad81
permissions -rw-r--r--
8007392: JSR 310: DateTime API Updates 8007520: Update date/time classes in j.util and j.sql packages 8007572: Replace existing jdk timezone data at <java.home>/lib/zi with JSR310's tzdb Summary: Integration of JSR310 Date/Time API for M7 Reviewed-by: darcy, alanb, naoto Contributed-by: scolebourne@joda.org, roger.riggs@oracle.com, masayoshi.okutsu@oracle.com, patrick.zhang@oracle.com
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
15658
55b829ca2334 8007392: JSR 310: DateTime API Updates
sherman
parents:
diff changeset
     1
/*
55b829ca2334 8007392: JSR 310: DateTime API Updates
sherman
parents:
diff changeset
     2
 * Copyright (c) 2000, 2012, Oracle and/or its affiliates. All rights reserved.
55b829ca2334 8007392: JSR 310: DateTime API Updates
sherman
parents:
diff changeset
     3
 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
55b829ca2334 8007392: JSR 310: DateTime API Updates
sherman
parents:
diff changeset
     4
 *
55b829ca2334 8007392: JSR 310: DateTime API Updates
sherman
parents:
diff changeset
     5
 * This code is free software; you can redistribute it and/or modify it
55b829ca2334 8007392: JSR 310: DateTime API Updates
sherman
parents:
diff changeset
     6
 * under the terms of the GNU General Public License version 2 only, as
55b829ca2334 8007392: JSR 310: DateTime API Updates
sherman
parents:
diff changeset
     7
 * published by the Free Software Foundation.  Oracle designates this
55b829ca2334 8007392: JSR 310: DateTime API Updates
sherman
parents:
diff changeset
     8
 * particular file as subject to the "Classpath" exception as provided
55b829ca2334 8007392: JSR 310: DateTime API Updates
sherman
parents:
diff changeset
     9
 * by Oracle in the LICENSE file that accompanied this code.
55b829ca2334 8007392: JSR 310: DateTime API Updates
sherman
parents:
diff changeset
    10
 *
55b829ca2334 8007392: JSR 310: DateTime API Updates
sherman
parents:
diff changeset
    11
 * This code is distributed in the hope that it will be useful, but WITHOUT
55b829ca2334 8007392: JSR 310: DateTime API Updates
sherman
parents:
diff changeset
    12
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
55b829ca2334 8007392: JSR 310: DateTime API Updates
sherman
parents:
diff changeset
    13
 * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
55b829ca2334 8007392: JSR 310: DateTime API Updates
sherman
parents:
diff changeset
    14
 * version 2 for more details (a copy is included in the LICENSE file that
55b829ca2334 8007392: JSR 310: DateTime API Updates
sherman
parents:
diff changeset
    15
 * accompanied this code).
55b829ca2334 8007392: JSR 310: DateTime API Updates
sherman
parents:
diff changeset
    16
 *
55b829ca2334 8007392: JSR 310: DateTime API Updates
sherman
parents:
diff changeset
    17
 * You should have received a copy of the GNU General Public License version
55b829ca2334 8007392: JSR 310: DateTime API Updates
sherman
parents:
diff changeset
    18
 * 2 along with this work; if not, write to the Free Software Foundation,
55b829ca2334 8007392: JSR 310: DateTime API Updates
sherman
parents:
diff changeset
    19
 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
55b829ca2334 8007392: JSR 310: DateTime API Updates
sherman
parents:
diff changeset
    20
 *
55b829ca2334 8007392: JSR 310: DateTime API Updates
sherman
parents:
diff changeset
    21
 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
55b829ca2334 8007392: JSR 310: DateTime API Updates
sherman
parents:
diff changeset
    22
 * or visit www.oracle.com if you need additional information or have any
55b829ca2334 8007392: JSR 310: DateTime API Updates
sherman
parents:
diff changeset
    23
 * questions.
55b829ca2334 8007392: JSR 310: DateTime API Updates
sherman
parents:
diff changeset
    24
 */
55b829ca2334 8007392: JSR 310: DateTime API Updates
sherman
parents:
diff changeset
    25
55b829ca2334 8007392: JSR 310: DateTime API Updates
sherman
parents:
diff changeset
    26
import  java.util.ArrayList;
55b829ca2334 8007392: JSR 310: DateTime API Updates
sherman
parents:
diff changeset
    27
import  java.util.HashMap;
55b829ca2334 8007392: JSR 310: DateTime API Updates
sherman
parents:
diff changeset
    28
import  java.util.LinkedList;
55b829ca2334 8007392: JSR 310: DateTime API Updates
sherman
parents:
diff changeset
    29
import  java.util.List;
55b829ca2334 8007392: JSR 310: DateTime API Updates
sherman
parents:
diff changeset
    30
import  java.util.Map;
55b829ca2334 8007392: JSR 310: DateTime API Updates
sherman
parents:
diff changeset
    31
import  java.util.Set;
55b829ca2334 8007392: JSR 310: DateTime API Updates
sherman
parents:
diff changeset
    32
import  java.util.TreeMap;
55b829ca2334 8007392: JSR 310: DateTime API Updates
sherman
parents:
diff changeset
    33
import  java.util.TreeSet;
55b829ca2334 8007392: JSR 310: DateTime API Updates
sherman
parents:
diff changeset
    34
55b829ca2334 8007392: JSR 310: DateTime API Updates
sherman
parents:
diff changeset
    35
/**
55b829ca2334 8007392: JSR 310: DateTime API Updates
sherman
parents:
diff changeset
    36
 * <code>Mappings</code> generates two Maps and a List which are used by
55b829ca2334 8007392: JSR 310: DateTime API Updates
sherman
parents:
diff changeset
    37
 * javazic BackEnd.
55b829ca2334 8007392: JSR 310: DateTime API Updates
sherman
parents:
diff changeset
    38
 *
55b829ca2334 8007392: JSR 310: DateTime API Updates
sherman
parents:
diff changeset
    39
 * @since 1.4
55b829ca2334 8007392: JSR 310: DateTime API Updates
sherman
parents:
diff changeset
    40
 */
55b829ca2334 8007392: JSR 310: DateTime API Updates
sherman
parents:
diff changeset
    41
class Mappings {
55b829ca2334 8007392: JSR 310: DateTime API Updates
sherman
parents:
diff changeset
    42
    // All aliases specified by Link statements. It's alias name to
55b829ca2334 8007392: JSR 310: DateTime API Updates
sherman
parents:
diff changeset
    43
    // real name mappings.
55b829ca2334 8007392: JSR 310: DateTime API Updates
sherman
parents:
diff changeset
    44
    private Map<String,String> aliases;
55b829ca2334 8007392: JSR 310: DateTime API Updates
sherman
parents:
diff changeset
    45
55b829ca2334 8007392: JSR 310: DateTime API Updates
sherman
parents:
diff changeset
    46
    private List<Integer> rawOffsetsIndex;
55b829ca2334 8007392: JSR 310: DateTime API Updates
sherman
parents:
diff changeset
    47
55b829ca2334 8007392: JSR 310: DateTime API Updates
sherman
parents:
diff changeset
    48
    private List<Set<String>> rawOffsetsIndexTable;
55b829ca2334 8007392: JSR 310: DateTime API Updates
sherman
parents:
diff changeset
    49
55b829ca2334 8007392: JSR 310: DateTime API Updates
sherman
parents:
diff changeset
    50
    // Zone names to be excluded from rawOffset table. Those have GMT
55b829ca2334 8007392: JSR 310: DateTime API Updates
sherman
parents:
diff changeset
    51
    // offsets to change some future time.
55b829ca2334 8007392: JSR 310: DateTime API Updates
sherman
parents:
diff changeset
    52
    private List<String> excludeList;
55b829ca2334 8007392: JSR 310: DateTime API Updates
sherman
parents:
diff changeset
    53
55b829ca2334 8007392: JSR 310: DateTime API Updates
sherman
parents:
diff changeset
    54
    /**
55b829ca2334 8007392: JSR 310: DateTime API Updates
sherman
parents:
diff changeset
    55
     * Constructor creates some necessary instances.
55b829ca2334 8007392: JSR 310: DateTime API Updates
sherman
parents:
diff changeset
    56
     */
55b829ca2334 8007392: JSR 310: DateTime API Updates
sherman
parents:
diff changeset
    57
    Mappings() {
55b829ca2334 8007392: JSR 310: DateTime API Updates
sherman
parents:
diff changeset
    58
        aliases = new TreeMap<String,String>();
55b829ca2334 8007392: JSR 310: DateTime API Updates
sherman
parents:
diff changeset
    59
        rawOffsetsIndex = new LinkedList<Integer>();
55b829ca2334 8007392: JSR 310: DateTime API Updates
sherman
parents:
diff changeset
    60
        rawOffsetsIndexTable = new LinkedList<Set<String>>();
55b829ca2334 8007392: JSR 310: DateTime API Updates
sherman
parents:
diff changeset
    61
    }
55b829ca2334 8007392: JSR 310: DateTime API Updates
sherman
parents:
diff changeset
    62
55b829ca2334 8007392: JSR 310: DateTime API Updates
sherman
parents:
diff changeset
    63
    /**
55b829ca2334 8007392: JSR 310: DateTime API Updates
sherman
parents:
diff changeset
    64
     * Generates aliases and rawOffsets tables.
55b829ca2334 8007392: JSR 310: DateTime API Updates
sherman
parents:
diff changeset
    65
     * @param zi a Zoneinfo containing Zones
55b829ca2334 8007392: JSR 310: DateTime API Updates
sherman
parents:
diff changeset
    66
     */
55b829ca2334 8007392: JSR 310: DateTime API Updates
sherman
parents:
diff changeset
    67
    void add(Zoneinfo zi) {
55b829ca2334 8007392: JSR 310: DateTime API Updates
sherman
parents:
diff changeset
    68
        Map<String,Zone> zones = zi.getZones();
55b829ca2334 8007392: JSR 310: DateTime API Updates
sherman
parents:
diff changeset
    69
55b829ca2334 8007392: JSR 310: DateTime API Updates
sherman
parents:
diff changeset
    70
        for (String zoneName : zones.keySet()) {
55b829ca2334 8007392: JSR 310: DateTime API Updates
sherman
parents:
diff changeset
    71
            Zone zone = zones.get(zoneName);
55b829ca2334 8007392: JSR 310: DateTime API Updates
sherman
parents:
diff changeset
    72
            String zonename = zone.getName();
55b829ca2334 8007392: JSR 310: DateTime API Updates
sherman
parents:
diff changeset
    73
            int rawOffset = zone.get(zone.size()-1).getGmtOffset();
55b829ca2334 8007392: JSR 310: DateTime API Updates
sherman
parents:
diff changeset
    74
55b829ca2334 8007392: JSR 310: DateTime API Updates
sherman
parents:
diff changeset
    75
            // If the GMT offset of this Zone will change in some
55b829ca2334 8007392: JSR 310: DateTime API Updates
sherman
parents:
diff changeset
    76
            // future time, this Zone is added to the exclude list.
55b829ca2334 8007392: JSR 310: DateTime API Updates
sherman
parents:
diff changeset
    77
            boolean isExcluded = false;
55b829ca2334 8007392: JSR 310: DateTime API Updates
sherman
parents:
diff changeset
    78
            for (int i = 0; i < zone.size(); i++) {
55b829ca2334 8007392: JSR 310: DateTime API Updates
sherman
parents:
diff changeset
    79
                ZoneRec zrec = zone.get(i);
55b829ca2334 8007392: JSR 310: DateTime API Updates
sherman
parents:
diff changeset
    80
                if ((zrec.getGmtOffset() != rawOffset)
55b829ca2334 8007392: JSR 310: DateTime API Updates
sherman
parents:
diff changeset
    81
                    && (zrec.getUntilTime(0) > Time.getCurrentTime())) {
55b829ca2334 8007392: JSR 310: DateTime API Updates
sherman
parents:
diff changeset
    82
                    if (excludeList == null) {
55b829ca2334 8007392: JSR 310: DateTime API Updates
sherman
parents:
diff changeset
    83
                        excludeList = new ArrayList<String>();
55b829ca2334 8007392: JSR 310: DateTime API Updates
sherman
parents:
diff changeset
    84
                    }
55b829ca2334 8007392: JSR 310: DateTime API Updates
sherman
parents:
diff changeset
    85
                    excludeList.add(zone.getName());
55b829ca2334 8007392: JSR 310: DateTime API Updates
sherman
parents:
diff changeset
    86
                    isExcluded = true;
55b829ca2334 8007392: JSR 310: DateTime API Updates
sherman
parents:
diff changeset
    87
                    break;
55b829ca2334 8007392: JSR 310: DateTime API Updates
sherman
parents:
diff changeset
    88
                }
55b829ca2334 8007392: JSR 310: DateTime API Updates
sherman
parents:
diff changeset
    89
            }
55b829ca2334 8007392: JSR 310: DateTime API Updates
sherman
parents:
diff changeset
    90
55b829ca2334 8007392: JSR 310: DateTime API Updates
sherman
parents:
diff changeset
    91
            if (!rawOffsetsIndex.contains(new Integer(rawOffset))) {
55b829ca2334 8007392: JSR 310: DateTime API Updates
sherman
parents:
diff changeset
    92
                // Find the index to insert this raw offset zones
55b829ca2334 8007392: JSR 310: DateTime API Updates
sherman
parents:
diff changeset
    93
                int n = rawOffsetsIndex.size();
55b829ca2334 8007392: JSR 310: DateTime API Updates
sherman
parents:
diff changeset
    94
                int i;
55b829ca2334 8007392: JSR 310: DateTime API Updates
sherman
parents:
diff changeset
    95
                for (i = 0; i < n; i++) {
55b829ca2334 8007392: JSR 310: DateTime API Updates
sherman
parents:
diff changeset
    96
                    if (rawOffsetsIndex.get(i) > rawOffset) {
55b829ca2334 8007392: JSR 310: DateTime API Updates
sherman
parents:
diff changeset
    97
                        break;
55b829ca2334 8007392: JSR 310: DateTime API Updates
sherman
parents:
diff changeset
    98
                    }
55b829ca2334 8007392: JSR 310: DateTime API Updates
sherman
parents:
diff changeset
    99
                }
55b829ca2334 8007392: JSR 310: DateTime API Updates
sherman
parents:
diff changeset
   100
                rawOffsetsIndex.add(i, rawOffset);
55b829ca2334 8007392: JSR 310: DateTime API Updates
sherman
parents:
diff changeset
   101
55b829ca2334 8007392: JSR 310: DateTime API Updates
sherman
parents:
diff changeset
   102
                Set<String> perRawOffset = new TreeSet<String>();
55b829ca2334 8007392: JSR 310: DateTime API Updates
sherman
parents:
diff changeset
   103
                if (!isExcluded) {
55b829ca2334 8007392: JSR 310: DateTime API Updates
sherman
parents:
diff changeset
   104
                    perRawOffset.add(zonename);
55b829ca2334 8007392: JSR 310: DateTime API Updates
sherman
parents:
diff changeset
   105
                }
55b829ca2334 8007392: JSR 310: DateTime API Updates
sherman
parents:
diff changeset
   106
                rawOffsetsIndexTable.add(i, perRawOffset);
55b829ca2334 8007392: JSR 310: DateTime API Updates
sherman
parents:
diff changeset
   107
            } else if (!isExcluded) {
55b829ca2334 8007392: JSR 310: DateTime API Updates
sherman
parents:
diff changeset
   108
                int i = rawOffsetsIndex.indexOf(new Integer(rawOffset));
55b829ca2334 8007392: JSR 310: DateTime API Updates
sherman
parents:
diff changeset
   109
                Set<String> perRawOffset = rawOffsetsIndexTable.get(i);
55b829ca2334 8007392: JSR 310: DateTime API Updates
sherman
parents:
diff changeset
   110
                perRawOffset.add(zonename);
55b829ca2334 8007392: JSR 310: DateTime API Updates
sherman
parents:
diff changeset
   111
            }
55b829ca2334 8007392: JSR 310: DateTime API Updates
sherman
parents:
diff changeset
   112
        }
55b829ca2334 8007392: JSR 310: DateTime API Updates
sherman
parents:
diff changeset
   113
55b829ca2334 8007392: JSR 310: DateTime API Updates
sherman
parents:
diff changeset
   114
        Map<String,String> a = zi.getAliases();
55b829ca2334 8007392: JSR 310: DateTime API Updates
sherman
parents:
diff changeset
   115
        // If there are time zone names which refer to any of the
55b829ca2334 8007392: JSR 310: DateTime API Updates
sherman
parents:
diff changeset
   116
        // excluded zones, add those names to the excluded list.
55b829ca2334 8007392: JSR 310: DateTime API Updates
sherman
parents:
diff changeset
   117
        if (excludeList != null) {
55b829ca2334 8007392: JSR 310: DateTime API Updates
sherman
parents:
diff changeset
   118
            for (String zoneName : a.keySet()) {
55b829ca2334 8007392: JSR 310: DateTime API Updates
sherman
parents:
diff changeset
   119
                String realname = a.get(zoneName);
55b829ca2334 8007392: JSR 310: DateTime API Updates
sherman
parents:
diff changeset
   120
                if (excludeList.contains(realname)) {
55b829ca2334 8007392: JSR 310: DateTime API Updates
sherman
parents:
diff changeset
   121
                    excludeList.add(zoneName);
55b829ca2334 8007392: JSR 310: DateTime API Updates
sherman
parents:
diff changeset
   122
                }
55b829ca2334 8007392: JSR 310: DateTime API Updates
sherman
parents:
diff changeset
   123
            }
55b829ca2334 8007392: JSR 310: DateTime API Updates
sherman
parents:
diff changeset
   124
        }
55b829ca2334 8007392: JSR 310: DateTime API Updates
sherman
parents:
diff changeset
   125
        aliases.putAll(a);
55b829ca2334 8007392: JSR 310: DateTime API Updates
sherman
parents:
diff changeset
   126
    }
55b829ca2334 8007392: JSR 310: DateTime API Updates
sherman
parents:
diff changeset
   127
55b829ca2334 8007392: JSR 310: DateTime API Updates
sherman
parents:
diff changeset
   128
    /**
55b829ca2334 8007392: JSR 310: DateTime API Updates
sherman
parents:
diff changeset
   129
     * Adds valid aliases to one of per-RawOffset table and removes
55b829ca2334 8007392: JSR 310: DateTime API Updates
sherman
parents:
diff changeset
   130
     * invalid aliases from aliases List. Aliases referring to
55b829ca2334 8007392: JSR 310: DateTime API Updates
sherman
parents:
diff changeset
   131
     * excluded zones are not added to a per-RawOffset table.
55b829ca2334 8007392: JSR 310: DateTime API Updates
sherman
parents:
diff changeset
   132
     */
55b829ca2334 8007392: JSR 310: DateTime API Updates
sherman
parents:
diff changeset
   133
    void resolve() {
55b829ca2334 8007392: JSR 310: DateTime API Updates
sherman
parents:
diff changeset
   134
        int index = rawOffsetsIndexTable.size();
55b829ca2334 8007392: JSR 310: DateTime API Updates
sherman
parents:
diff changeset
   135
        List<String> toBeRemoved = new ArrayList<String>();
55b829ca2334 8007392: JSR 310: DateTime API Updates
sherman
parents:
diff changeset
   136
        for (String key : aliases.keySet()) {
55b829ca2334 8007392: JSR 310: DateTime API Updates
sherman
parents:
diff changeset
   137
            boolean validname = false;
55b829ca2334 8007392: JSR 310: DateTime API Updates
sherman
parents:
diff changeset
   138
            for (int j = 0; j < index; j++) {
55b829ca2334 8007392: JSR 310: DateTime API Updates
sherman
parents:
diff changeset
   139
                Set<String> perRO = rawOffsetsIndexTable.get(j);
55b829ca2334 8007392: JSR 310: DateTime API Updates
sherman
parents:
diff changeset
   140
                boolean isExcluded = (excludeList == null) ?
55b829ca2334 8007392: JSR 310: DateTime API Updates
sherman
parents:
diff changeset
   141
                                        false : excludeList.contains(key);
55b829ca2334 8007392: JSR 310: DateTime API Updates
sherman
parents:
diff changeset
   142
55b829ca2334 8007392: JSR 310: DateTime API Updates
sherman
parents:
diff changeset
   143
                if ((perRO.contains(aliases.get(key)) || isExcluded)
55b829ca2334 8007392: JSR 310: DateTime API Updates
sherman
parents:
diff changeset
   144
                    && Zone.isTargetZone(key)) {
55b829ca2334 8007392: JSR 310: DateTime API Updates
sherman
parents:
diff changeset
   145
                    validname = true;
55b829ca2334 8007392: JSR 310: DateTime API Updates
sherman
parents:
diff changeset
   146
                    if (!isExcluded) {
55b829ca2334 8007392: JSR 310: DateTime API Updates
sherman
parents:
diff changeset
   147
                        perRO.add(key);
55b829ca2334 8007392: JSR 310: DateTime API Updates
sherman
parents:
diff changeset
   148
                        Main.info("Alias <"+key+"> added to the list.");
55b829ca2334 8007392: JSR 310: DateTime API Updates
sherman
parents:
diff changeset
   149
                    }
55b829ca2334 8007392: JSR 310: DateTime API Updates
sherman
parents:
diff changeset
   150
                    break;
55b829ca2334 8007392: JSR 310: DateTime API Updates
sherman
parents:
diff changeset
   151
                }
55b829ca2334 8007392: JSR 310: DateTime API Updates
sherman
parents:
diff changeset
   152
            }
55b829ca2334 8007392: JSR 310: DateTime API Updates
sherman
parents:
diff changeset
   153
55b829ca2334 8007392: JSR 310: DateTime API Updates
sherman
parents:
diff changeset
   154
            if (!validname) {
55b829ca2334 8007392: JSR 310: DateTime API Updates
sherman
parents:
diff changeset
   155
                Main.info("Alias <"+key+"> removed from the list.");
55b829ca2334 8007392: JSR 310: DateTime API Updates
sherman
parents:
diff changeset
   156
                toBeRemoved.add(key);
55b829ca2334 8007392: JSR 310: DateTime API Updates
sherman
parents:
diff changeset
   157
            }
55b829ca2334 8007392: JSR 310: DateTime API Updates
sherman
parents:
diff changeset
   158
        }
55b829ca2334 8007392: JSR 310: DateTime API Updates
sherman
parents:
diff changeset
   159
55b829ca2334 8007392: JSR 310: DateTime API Updates
sherman
parents:
diff changeset
   160
        // Remove zones, if any, from the list.
55b829ca2334 8007392: JSR 310: DateTime API Updates
sherman
parents:
diff changeset
   161
        for (String key : toBeRemoved) {
55b829ca2334 8007392: JSR 310: DateTime API Updates
sherman
parents:
diff changeset
   162
            aliases.remove(key);
55b829ca2334 8007392: JSR 310: DateTime API Updates
sherman
parents:
diff changeset
   163
        }
55b829ca2334 8007392: JSR 310: DateTime API Updates
sherman
parents:
diff changeset
   164
        // Eliminate any alias-to-alias mappings. For example, if
55b829ca2334 8007392: JSR 310: DateTime API Updates
sherman
parents:
diff changeset
   165
        // there are A->B and B->C, A->B is changed to A->C.
55b829ca2334 8007392: JSR 310: DateTime API Updates
sherman
parents:
diff changeset
   166
        Map<String, String> newMap = new HashMap<String, String>();
55b829ca2334 8007392: JSR 310: DateTime API Updates
sherman
parents:
diff changeset
   167
        for (String key : aliases.keySet()) {
55b829ca2334 8007392: JSR 310: DateTime API Updates
sherman
parents:
diff changeset
   168
            String realid = aliases.get(key);
55b829ca2334 8007392: JSR 310: DateTime API Updates
sherman
parents:
diff changeset
   169
            String leaf = realid;
55b829ca2334 8007392: JSR 310: DateTime API Updates
sherman
parents:
diff changeset
   170
            while (aliases.get(leaf) != null) {
55b829ca2334 8007392: JSR 310: DateTime API Updates
sherman
parents:
diff changeset
   171
                leaf = aliases.get(leaf);
55b829ca2334 8007392: JSR 310: DateTime API Updates
sherman
parents:
diff changeset
   172
            }
55b829ca2334 8007392: JSR 310: DateTime API Updates
sherman
parents:
diff changeset
   173
            if (!realid.equals(leaf)) {
55b829ca2334 8007392: JSR 310: DateTime API Updates
sherman
parents:
diff changeset
   174
                newMap.put(key, leaf);
55b829ca2334 8007392: JSR 310: DateTime API Updates
sherman
parents:
diff changeset
   175
            }
55b829ca2334 8007392: JSR 310: DateTime API Updates
sherman
parents:
diff changeset
   176
        }
55b829ca2334 8007392: JSR 310: DateTime API Updates
sherman
parents:
diff changeset
   177
        aliases.putAll(newMap);
55b829ca2334 8007392: JSR 310: DateTime API Updates
sherman
parents:
diff changeset
   178
    }
55b829ca2334 8007392: JSR 310: DateTime API Updates
sherman
parents:
diff changeset
   179
55b829ca2334 8007392: JSR 310: DateTime API Updates
sherman
parents:
diff changeset
   180
    Map<String,String> getAliases() {
55b829ca2334 8007392: JSR 310: DateTime API Updates
sherman
parents:
diff changeset
   181
        return(aliases);
55b829ca2334 8007392: JSR 310: DateTime API Updates
sherman
parents:
diff changeset
   182
    }
55b829ca2334 8007392: JSR 310: DateTime API Updates
sherman
parents:
diff changeset
   183
55b829ca2334 8007392: JSR 310: DateTime API Updates
sherman
parents:
diff changeset
   184
    List<Integer> getRawOffsetsIndex() {
55b829ca2334 8007392: JSR 310: DateTime API Updates
sherman
parents:
diff changeset
   185
        return(rawOffsetsIndex);
55b829ca2334 8007392: JSR 310: DateTime API Updates
sherman
parents:
diff changeset
   186
    }
55b829ca2334 8007392: JSR 310: DateTime API Updates
sherman
parents:
diff changeset
   187
55b829ca2334 8007392: JSR 310: DateTime API Updates
sherman
parents:
diff changeset
   188
    List<Set<String>> getRawOffsetsIndexTable() {
55b829ca2334 8007392: JSR 310: DateTime API Updates
sherman
parents:
diff changeset
   189
        return(rawOffsetsIndexTable);
55b829ca2334 8007392: JSR 310: DateTime API Updates
sherman
parents:
diff changeset
   190
    }
55b829ca2334 8007392: JSR 310: DateTime API Updates
sherman
parents:
diff changeset
   191
55b829ca2334 8007392: JSR 310: DateTime API Updates
sherman
parents:
diff changeset
   192
    List<String> getExcludeList() {
55b829ca2334 8007392: JSR 310: DateTime API Updates
sherman
parents:
diff changeset
   193
        return excludeList;
55b829ca2334 8007392: JSR 310: DateTime API Updates
sherman
parents:
diff changeset
   194
    }
55b829ca2334 8007392: JSR 310: DateTime API Updates
sherman
parents:
diff changeset
   195
}