[Unicode]   Common Locale Data Repository : Bug Tracking Home | Site Map | Search
 

Changeset 9592


Ignore:
Timestamp:
12/26/13 16:18:04 (5 years ago)
Author:
srloomis
Message:

cldrbug 6717: revert r9589 (which reverted r9588) - code cleanup

Location:
trunk/tools/java/org/unicode/cldr/util
Files:
39 edited

Legend:

Unmodified
Added
Removed
  • trunk/tools/java/org/unicode/cldr/util/Builder.java

    r9589 r9592  
    133133        } 
    134134 
     135        @SuppressWarnings("unchecked") 
    135136        public CBuilder<E, U> addAll(E... items) { 
    136137            for (E item : items) { 
     
    151152        } 
    152153 
     154        @SuppressWarnings("unchecked") 
    153155        public <T> CBuilder<E, U> addAll(Transform<T, E> transform, T... items) { 
    154156            return addAll(Transformer.iterator(transform, items)); 
     
    174176        } 
    175177 
     178        @SuppressWarnings("unchecked") 
    176179        public CBuilder<E, U> removeAll(E... items) { 
    177180            for (E item : items) { 
     
    193196        } 
    194197 
     198        @SuppressWarnings("unchecked") 
    195199        public CBuilder<E, U> retainAll(E... items) { 
    196200            collection.retainAll(Arrays.asList(items)); 
     
    219223        } 
    220224 
     225        @SuppressWarnings("unchecked") 
    221226        public CBuilder<E, U> xor(E... items) { 
    222227            return xor(Arrays.asList(items)); 
     
    236241        } 
    237242 
     243        @SuppressWarnings("unchecked") 
    238244        public CBuilder<E, U> keepNew(E... items) { 
    239245            return keepNew(Arrays.asList(items)); 
     
    332338        } 
    333339 
     340        @SuppressWarnings("unchecked") 
    334341        public MBuilder<K, V, M> on(K... keys) { 
    335342            this.keys = Arrays.asList(keys); 
     
    350357        } 
    351358 
     359        @SuppressWarnings("unchecked") 
    352360        public MBuilder<K, V, M> put(V... values) { 
    353361            int v = 0; 
     
    385393        } 
    386394 
     395        @SuppressWarnings("unchecked") 
    387396        public MBuilder<K, V, M> putAll(K[][] m) { 
    388397            for (K[] pair : m) { 
     
    410419        } 
    411420 
     421        @SuppressWarnings("unchecked") 
    412422        public MBuilder<K, V, M> removeAll(K... keys) { 
    413423            return removeAll(Arrays.asList(keys)); 
     
    429439        } 
    430440 
     441        @SuppressWarnings("unchecked") 
    431442        public MBuilder<K, V, M> retainAll(K... keys) { 
    432443            return retainAll(Arrays.asList(keys)); 
  • trunk/tools/java/org/unicode/cldr/util/CLDRFile.java

    r9589 r9592  
    5757import com.ibm.icu.dev.util.Relation; 
    5858import com.ibm.icu.impl.Utility; 
    59 import com.ibm.icu.text.DateTimePatternGenerator; 
    6059import com.ibm.icu.text.MessageFormat; 
    6160import com.ibm.icu.text.PluralRules; 
     
    470469        if (x.size() != 0) { 
    471470            String extras = "Comments without bases" + XPathParts.NEWLINE; 
    472             for (Iterator it = x.iterator(); it.hasNext();) { 
    473                 String key = (String) it.next(); 
     471            for (Iterator<String> it = x.iterator(); it.hasNext();) { 
     472                String key = it.next(); 
    474473                // Log.logln("Writing extra comment: " + key); 
    475474                extras += XPathParts.NEWLINE + key; 
     
    684683        } else if (conflict_resolution == MERGE_REPLACE_MY_DRAFT) { 
    685684            // first find all my alt=..proposed items 
    686             Set hasDraftVersion = new HashSet(); 
    687             for (Iterator it = dataSource.iterator(); it.hasNext();) { 
    688                 String cpath = (String) it.next(); 
     685            Set<String> hasDraftVersion = new HashSet<String>(); 
     686            for (Iterator<String> it = dataSource.iterator(); it.hasNext();) { 
     687                String cpath = it.next(); 
    689688                String fullpath = getFullXPath(cpath); 
    690689                if (fullpath.indexOf("[@draft") >= 0) { 
     
    695694            // this is either an item with draft in the fullpath 
    696695            // or an item with draft and alt in the full path 
    697             for (Iterator it = other.iterator(); it.hasNext();) { 
    698                 String cpath = (String) it.next(); 
     696            for (Iterator<String> it = other.iterator(); it.hasNext();) { 
     697                String cpath = it.next(); 
    699698                // Value otherValueOld = (Value) other.getXpath_value().get(cpath); 
    700699                // fix the data 
     
    723722            } 
    724723        } else if (conflict_resolution == MERGE_ADD_ALTERNATE) { 
    725             for (Iterator it = other.iterator(); it.hasNext();) { 
    726                 String key = (String) it.next(); 
     724            for (Iterator<String> it = other.iterator(); it.hasNext();) { 
     725                String key = it.next(); 
    727726                String otherValue = other.getStringValue(key); 
    728727                String myValue = dataSource.getValueAtPath(key); 
     
    773772        String accummulatedReferences = null; 
    774773        for (int i = 0; i < parts.size(); ++i) { 
    775             Map attributes = parts.getAttributes(i); 
    776             String references = (String) attributes.get("references"); 
     774            Map<String, String> attributes = parts.getAttributes(i); 
     775            String references = attributes.get("references"); 
    777776            if (references == null) continue; 
    778777            if (accummulatedReferences == null) 
     
    783782        if (accummulatedReferences == null) return newFullPath; 
    784783        XPathParts newParts = new XPathParts(null, null).set(newFullPath); 
    785         Map attributes = newParts.getAttributes(newParts.size() - 1); 
    786         String references = (String) attributes.get("references"); 
     784        Map<String, String> attributes = newParts.getAttributes(newParts.size() - 1); 
     785        String references = attributes.get("references"); 
    787786        if (references == null) 
    788787            references = accummulatedReferences; 
     
    818817     * Removes all xpaths from a CLDRFile. 
    819818     */ 
    820     public CLDRFile removeAll(Set xpaths, boolean butComment) { 
     819    public CLDRFile removeAll(Set<String> xpaths, boolean butComment) { 
    821820        if (butComment) appendFinalComment("Illegal attributes removed:"); 
    822         for (Iterator it = xpaths.iterator(); it.hasNext();) { 
    823             remove((String) it.next(), butComment); 
     821        for (Iterator<String> it = xpaths.iterator(); it.hasNext();) { 
     822            remove(it.next(), butComment); 
    824823        } 
    825824        return this; 
     
    880879            removedItems.clear(); 
    881880        } 
    882         for (Iterator it = iterator(); it.hasNext();) { // see what items we have that the other also has 
    883             String xpath = (String) it.next(); 
     881        for (Iterator<String> it = iterator(); it.hasNext();) { // see what items we have that the other also has 
     882            String xpath = it.next(); 
    884883            switch (keepIfMatches.getRetention(xpath)) { 
    885884            case RETAIN: 
     
    943942        Matcher specialPathMatcher = specialsToPushFromRoot.matcher(""); 
    944943        XPathParts parts = new XPathParts(getAttributeOrdering(), defaultSuppressionMap); 
    945         for (Iterator it = rootFile.iterator(); it.hasNext();) { 
    946             String xpath = (String) it.next(); 
     944        for (Iterator<String> it = rootFile.iterator(); it.hasNext();) { 
     945            String xpath = it.next(); 
    947946 
    948947            // skip aliases, choices 
     
    963962            if (!otherFullXPath.contains("[@draft")) { 
    964963                parts.set(otherFullXPath); 
    965                 Map attributes = parts.getAttributes(-1); 
     964                Map<String, String> attributes = parts.getAttributes(-1); 
    966965                attributes.put("draft", "unconfirmed"); 
    967966                otherFullXPath = parts.toString(); 
     
    11921191            XPathParts parts = new XPathParts(null, null).set(xpath); 
    11931192            String restore; 
    1194             HashSet<String> toRemove = new HashSet(); 
     1193            HashSet<String> toRemove = new HashSet<String>(); 
    11951194            for (int i = 0; i < parts.size(); ++i) { 
    11961195                if (parts.getAttributeCount(i) == 0) { 
    11971196                    continue; 
    11981197                } 
    1199                 String element = parts.getElement(i); 
    1200                 Map attributes = parts.getAttributes(i); 
     1198                Map<String, String> attributes = parts.getAttributes(i); 
    12011199                toRemove.clear(); 
    12021200                restore = null; 
    1203                 for (Iterator it = attributes.keySet().iterator(); it.hasNext();) { 
    1204                     String attribute = (String) it.next(); 
     1201                for (Iterator<String> it = attributes.keySet().iterator(); it.hasNext();) { 
     1202                    String attribute = it.next(); 
    12051203                    if (attribute.equals("draft")) { 
    12061204                        toRemove.add(attribute); 
     
    15091507        private String currentFullXPath = "/"; 
    15101508        private String comment = null; 
    1511         private Map attributeOrder; 
     1509        private Map<String, String> attributeOrder; 
    15121510        private DtdData dtdData; 
    15131511        private CLDRFile target; 
     
    15761574                    } 
    15771575                } 
    1578                 for (Iterator it = attributeOrder.keySet().iterator(); it.hasNext();) { 
    1579                     String attribute = (String) it.next(); 
    1580                     String value = (String) attributeOrder.get(attribute); 
     1576                for (Iterator<String> it = attributeOrder.keySet().iterator(); it.hasNext();) { 
     1577                    String attribute = it.next(); 
     1578                    String value = attributeOrder.get(attribute); 
    15811579                    String both = "[@" + attribute + "=\"" + value + "\"]"; // TODO quote the value?? 
    15821580                    currentFullXPath += both; 
     
    16381636         * Types which changed from 'type' to 'choice', but not in supplemental data. 
    16391637         */ 
    1640         private static Set changedTypes = new HashSet(Arrays.asList(new String[] { 
     1638        private static Set<String> changedTypes = new HashSet<String>(Arrays.asList(new String[] { 
    16411639            "abbreviationFallback", 
    16421640            "default", "mapping", "measurementSystem", "preferenceOrdering" })); 
     
    18071805            try { 
    18081806                if (isSupplemental < 0) { // set by first element 
    1809                     attributeOrder = new TreeMap(dtdData.getAttributeComparator()); 
     1807                    attributeOrder = new TreeMap<String, String>(dtdData.getAttributeComparator()); 
    18101808                    isSupplemental = target.dtdType == DtdType.ldml ? 0 : 1; 
    18111809                    //                    if (qName.equals("ldml")) 
     
    24142412     */ 
    24152413    public static List<String> getElementOrder() { 
    2416         return Collections.EMPTY_LIST; // elementOrdering.getOrder(); // already unmodifiable 
     2414        return Collections.emptyList(); // elementOrdering.getOrder(); // already unmodifiable 
    24172415    } 
    24182416 
     
    27202718    //    } 
    27212719 
    2722     private final static Map defaultSuppressionMap; 
     2720    private final static Map<String, Map<String, String>> defaultSuppressionMap; 
    27232721    static { 
    27242722        String[][] data = { 
     
    27422740            { "*", "_q", "*" }, 
    27432741        }; 
    2744         Map tempmain = asMap(data, true); 
     2742        Map<String, Map<String, String>> tempmain = asMap(data, true); 
    27452743        defaultSuppressionMap = Collections.unmodifiableMap(tempmain); 
    27462744    } 
    27472745 
    2748     public static Map getDefaultSuppressionMap() { 
     2746    public static Map<String, Map<String, String>> getDefaultSuppressionMap() { 
    27492747        return defaultSuppressionMap; 
    27502748    } 
    27512749 
     2750    @SuppressWarnings({ "rawtypes", "unchecked" }) 
    27522751    private static Map asMap(String[][] data, boolean tree) { 
    27532752        Map tempmain = tree ? (Map) new TreeMap() : new HashMap(); 
     
    28692868                    } 
    28702869                    DtdType type = distinguishingParts.getDtdData().dtdType; 
    2871                     Set<String> toRemove = new HashSet(); 
     2870                    Set<String> toRemove = new HashSet<String>(); 
    28722871 
    28732872                    // first clean up draft and alt 
     
    29132912                            --placementIndex; 
    29142913                        } 
    2915                         Map<String, String> attributes = distinguishingParts.getAttributes(placementIndex); 
    29162914                        if (draft != null) { 
    29172915                            distinguishingParts.putAttributeValue(placementIndex, "draft", draft); 
     
    32163214                throw new IllegalArgumentException("baseFile must be resolved"); 
    32173215            } 
    3218             Relation<String, String> pathMap = new Relation(new HashMap<String, String>(), TreeSet.class, 
     3216            Relation<String, String> pathMap = Relation.of(new HashMap<String, Set<String>>(), TreeSet.class, 
    32193217                new WinningComparator(user)); 
    32203218            for (String path : baseFile) { 
  • trunk/tools/java/org/unicode/cldr/util/CLDRTransforms.java

    r9589 r9592  
    124124        // List<String> extras = new ArrayList<String>(); 
    125125 
    126         Relation<Matcher, String> dependsOn = new Relation(new LinkedHashMap(), LinkedHashSet.class); 
     126        Relation<Matcher, String> dependsOn = Relation.of(new LinkedHashMap<Matcher, Set<String>>(), LinkedHashSet.class); 
    127127        { 
    128128            addDependency("Latin-(Jamo|Hangul)(/.*)?", "Latin-ConjoiningJamo", "ConjoiningJamo-Latin"); 
  • trunk/tools/java/org/unicode/cldr/util/CldrUtility.java

    r9589 r9592  
    373373     * Really, really ugly code, since Java doesn't let us do better. 
    374374     */ 
     375    @SuppressWarnings({ "rawtypes", "unchecked" }) 
    375376    public static <T> T protectCollection(T source) { 
    376377        // TODO - exclude UnmodifiableMap, Set, ... 
     
    416417     * @return 
    417418     */ 
     419    @SuppressWarnings("unchecked") 
    418420    public static <T> T clone(T source) { 
    419421        try { 
     
    481483     * Utility like Arrays.asList() 
    482484     */ 
     485    @SuppressWarnings("unchecked") 
    483486    public static <K, V> Map<K, V> asMap(Object[][] source, Map<K, V> target, boolean reverse) { 
    484487        int from = 0, to = 1; 
     
    687690    } 
    688691 
     692    @SuppressWarnings({ "rawtypes", "unchecked" }) 
    689693    public static void addTreeMapChain(Map coverageData, Object... objects) { 
    690694        Map<Object, Object> base = coverageData; 
  • trunk/tools/java/org/unicode/cldr/util/DelegatingIterator.java

    r9589 r9592  
    99    private int item = 0; 
    1010 
     11    @SuppressWarnings("unchecked") 
    1112    public DelegatingIterator(Iterator<T>... iterators) { 
    1213        this.iterators = iterators; 
     
    3940    } 
    4041 
     42    @SuppressWarnings("unchecked") 
    4143    public static <T> Iterable<T> iterable(Iterable<T>... s) { 
    4244        return new MyIterable<T>(s); 
    4345    } 
    4446 
     47    @SuppressWarnings("unchecked") 
    4548    public static <T> T[] array(T... s) { 
    4649        return s; 
     
    5053        public Iterable<T>[] iterables; 
    5154 
     55        @SuppressWarnings("unchecked") 
    5256        public MyIterable(Iterable<T>... s) { 
    5357            iterables = s; 
  • trunk/tools/java/org/unicode/cldr/util/DiscreteComparator.java

    r9589 r9592  
    173173         * @return this, for chaining 
    174174         */ 
     175        @SuppressWarnings("unchecked") 
    175176        public Builder<T> add(T... items) { 
    176177            if (items.length < 2) { 
     
    332333        } 
    333334 
    334         @SuppressWarnings("unchecked") 
     335        @SuppressWarnings({ "unchecked", "rawtypes" }) 
    335336        public int compareTo(Node<T> o) { 
    336337            return ((Comparable) me).compareTo((Comparable) (o.me)); 
  • trunk/tools/java/org/unicode/cldr/util/DtdDataCheck.java

    r9589 r9592  
    11package org.unicode.cldr.util; 
    22 
    3 import java.io.BufferedReader; 
    43import java.io.IOException; 
    54import java.io.PrintWriter; 
    65import java.util.Arrays; 
    76import java.util.Comparator; 
    8 import java.util.EnumMap; 
    97import java.util.HashSet; 
    108import java.util.LinkedHashSet; 
     
    1513import java.util.TreeSet; 
    1614 
    17 import org.unicode.cldr.draft.FileUtilities; 
    1815import org.unicode.cldr.unittest.TestAll.TestInfo; 
    1916import org.unicode.cldr.util.CLDRFile.DtdType; 
     
    2926import com.ibm.icu.impl.Row; 
    3027import com.ibm.icu.impl.Row.R2; 
    31 import com.ibm.icu.impl.Row.R3; 
    3228import com.ibm.icu.impl.Row.R4; 
    3329 
     
    4642        Set<Element> elementsMissingDraft = new LinkedHashSet<Element>(); 
    4743        Set<Element> elementsMissingAlt = new LinkedHashSet<Element>(); 
    48         Set<Element> elementsMissingAlias = new LinkedHashSet<Element>(); 
    49         Set<Element> elementsMissingSpecial = new LinkedHashSet<Element>(); 
    5044        static final Set<String> SKIP_ATTRIBUTES = new HashSet<String>(Arrays.asList( 
    5145            "draft", "alt", "standard", "references")); 
     
    187181            br.append(dtdData.toString()); 
    188182            br.close(); 
    189             long duration = timer.stop(); 
     183            timer.stop(); 
    190184            System.out.println("Time: " + timer); 
    191185            if (true) { 
     
    245239            DtdType type = CLDRFile.DtdType.valueOf(arg); 
    246240            DtdData dtdData = DtdData.getInstance(type); 
    247             long duration = timer.stop(); 
     241            timer.stop(); 
    248242            System.out.println("Time: " + timer); 
    249243        } 
  • trunk/tools/java/org/unicode/cldr/util/ElementAttributeInfo.java

    r9589 r9592  
    2929    private DtdType dtdType; 
    3030    private Map<R2<String, String>, R3<Set<String>, String, String>> elementAttribute2Data = new TreeMap<R2<String, String>, R3<Set<String>, String, String>>(); 
    31     private Relation<String, String> element2children = new Relation(new LinkedHashMap(), LinkedHashSet.class); 
    32     private Relation<String, String> element2parents = new Relation(new LinkedHashMap(), LinkedHashSet.class); 
    33     private Relation<String, String> element2attributes = new Relation(new LinkedHashMap(), LinkedHashSet.class); 
     31    private Relation<String, String> element2children = Relation.of(new LinkedHashMap<String, Set<String>>(), LinkedHashSet.class); 
     32    private Relation<String, String> element2parents = Relation.of(new LinkedHashMap<String, Set<String>>(), LinkedHashSet.class); 
     33    private Relation<String, String> element2attributes = Relation.of(new LinkedHashMap<String, Set<String>>(), LinkedHashSet.class); 
    3434 
    3535    static Map<String, Map<DtdType, ElementAttributeInfo>> cache = new HashMap<String, Map<DtdType, ElementAttributeInfo>>(); // new 
  • trunk/tools/java/org/unicode/cldr/util/ExtractCollationRules.java

    r9589 r9592  
    3333        String lastType = ""; 
    3434        rules.setLength(0); 
    35         int lastLen = 0; 
    3635 
    3736        String context = null; 
     
    5049                type_rules.put(lastType, rules.toString()); 
    5150                rules.setLength(0); 
    52                 lastLen = 0; 
    5351            } 
    5452            String mainType = parts.getElement(3); 
     
    128126    } 
    129127 
    130     private void writeSettings(Map attributes, StringBuffer results) { 
    131         for (Iterator it = attributes.keySet().iterator(); it.hasNext();) { 
    132             String attribute = (String) it.next(); 
    133             String value = (String) attributes.get(attribute); 
     128    private void writeSettings(Map<String, String> attributes, StringBuffer results) { 
     129        for (Iterator<String> it = attributes.keySet().iterator(); it.hasNext();) { 
     130            String attribute = it.next(); 
     131            String value = attributes.get(attribute); 
    134132            // TODO fix different cases 
    135133            results.append("[" + attribute + " " + value + "]" + CldrUtility.LINE_SEPARATOR); 
  • trunk/tools/java/org/unicode/cldr/util/FindDTDOrder.java

    r9589 r9592  
    195195    private boolean isAncestorOf(String possibleAncestor, String possibleDescendent) { 
    196196        if (ancestorToDescendant == null) { 
    197             ancestorToDescendant = new Relation(new TreeMap<String, String>(), TreeSet.class); 
     197            ancestorToDescendant = Relation.of(new TreeMap<String, Set<String>>(), TreeSet.class); 
    198198            buildPairwiseRelations(new ArrayList<String>(), "ldml"); 
    199199        } 
     
    230230    Object DONE = new Object(); // marker 
    231231 
    232     Relation<String, String> elementToChildren = new Relation(new TreeMap(), 
     232    Relation<String, String> elementToChildren = Relation.of(new TreeMap<String, Set<String>>(), 
    233233        TreeSet.class); 
    234234 
     
    626626    Map<String, Set<String>> attribEquiv = new TreeMap<String, Set<String>>(); 
    627627 
    628     Relation<String, String> attributeToElements = new Relation(new TreeMap(), 
     628    Relation<String, String> attributeToElements = Relation.of(new TreeMap<String, Set<String>>(), 
    629629        TreeSet.class); 
    630630    private XEquivalenceClass attributeEquivalents; 
  • trunk/tools/java/org/unicode/cldr/util/ICUServiceBuilder.java

    r9589 r9592  
    172172        cacheDateFormats.put(key, result); 
    173173        // System.out.println("created " + key); 
    174         SimpleDateFormat sdf = (SimpleDateFormat) result.clone(); 
    175174        return (SimpleDateFormat) result.clone(); 
    176175    } 
     
    212211        if (result != null) return (DateFormatSymbols) result.clone(); 
    213212 
    214         DateFormatSymbols gregorianBackup = null; 
    215         boolean notGregorian = !calendar.equals("gregorian"); 
    216213        String[] last; 
    217214        // TODO We would also like to be able to set the new symbols leapMonthPatterns & shortYearNames 
     
    235232        int minEras = (calendar.equals("chinese") || calendar.equals("dangi")) ? 0 : 1; 
    236233 
    237         List temp = getArray(prefix + "eras/eraAbbr/era[@type=\"", 0, null, "\"]", minEras); 
     234        List<String> temp = getArray(prefix + "eras/eraAbbr/era[@type=\"", 0, null, "\"]", minEras); 
    238235        formatData.setEras(last = (String[]) temp.toArray(new String[temp.size()])); 
    239236        if (minEras != 0) checkFound(last); 
     
    389386        boolean isDay = type.equals("day"); 
    390387        final int arrayCount = isDay ? 7 : type.equals("month") ? 12 : 4; 
    391         List temp = getArray(prefix, isDay ? 0 : 1, isDay ? Days : null, postfix, arrayCount); 
     388        List<String> temp = getArray(prefix, isDay ? 0 : 1, isDay ? Days : null, postfix, arrayCount); 
    392389        if (isDay) temp.add(0, ""); 
    393390        String[] result = (String[]) temp.toArray(new String[temp.size()]); 
     
    428425 
    429426    private static String[] NumberNames = { "integer", "decimal", "percent", "scientific" }; // // "standard", , "INR", 
    430                                                                                              // "CHF", "GBP" 
    431     private static int firstReal = 1; 
    432     private static int firstCurrency = 4; 
    433427 
    434428    public String getNumberNames(int i) { 
  • trunk/tools/java/org/unicode/cldr/util/IntMap.java

    r9589 r9592  
    7676 
    7777    public static class BasicIntMapFactory<T> implements IntMapFactory<T> { 
     78        @SuppressWarnings("unchecked") 
    7879        public BasicIntMap<T> make(Collection<T> values) { 
    7980            return new BasicIntMap<T>((T[]) new ArrayList<T>(new HashSet<T>(values)).toArray()); 
     
    131132        public CompactStringIntMap make(Collection<String> values) { 
    132133            // first sort, longest first 
    133             Set<String> sorted = new TreeSet(LONGEST_FIRST_COMPARATOR); 
     134            Set<String> sorted = new TreeSet<String>(LONGEST_FIRST_COMPARATOR); 
    134135            sorted.addAll(values); 
    135136 
  • trunk/tools/java/org/unicode/cldr/util/Iso639Data.java

    r9589 r9592  
    273273    }; 
    274274 
    275     private enum Status { 
    276         BASE, BEFORE_CELL, IN_CELL, IN_INSIDE_TABLE 
    277     }; 
    278  
    279275    private static void getData() { 
    280276        try { 
     
    285281            in = CldrUtility.getUTF8Data("iso-639-3.tab"); 
    286282            Pattern tabs = Pattern.compile("\\t"); 
    287             toAlpha3 = new HashMap(); 
    288             fromAlpha3 = new HashMap(); 
    289             toBiblio3 = new HashMap(); 
    290             fromBiblio3 = new HashMap(); 
    291             toScope = new HashMap(); 
    292             toType = new HashMap(); 
    293             toNames = new Relation(new TreeMap(), LinkedHashSet.class); 
    294             toRetirements = new Relation(new TreeMap(), LinkedHashSet.class); 
    295             macro_encompassed = new Relation(new TreeMap(), LinkedHashSet.class); 
    296             encompassed_macro = new HashMap(); 
    297             toSource = new HashMap(); 
     283            toAlpha3 = new HashMap<String, String>(); 
     284            fromAlpha3 = new HashMap<String, String>(); 
     285            toBiblio3 = new HashMap<String, String>(); 
     286            fromBiblio3 = new HashMap<String, String>(); 
     287            toScope = new HashMap<String, Scope>(); 
     288            toType = new HashMap<String, Type>(); 
     289            toNames = Relation.of(new TreeMap<String, Set<String>>(), LinkedHashSet.class); 
     290            toRetirements = Relation.of(new TreeMap<String, Set<String>>(), LinkedHashSet.class); 
     291            macro_encompassed = Relation.of(new TreeMap<String, Set<String>>(), LinkedHashSet.class); 
     292            encompassed_macro = new HashMap<String, String>(); 
     293            toSource = new HashMap<String, Source>(); 
    298294            toSource.put("sh", Source.ISO_639_1); // add deprecated language 
    299295 
     
    407403            // and a French name of a language are all separated by pipe (|) 
    408404            // characters. 
    409             int addCounter = 0; 
    410405            while (true) { 
    411406                String line = in.readLine(); 
  • trunk/tools/java/org/unicode/cldr/util/IsoCurrencyParser.java

    r9589 r9592  
    7474    } 
    7575 
    76     private Relation<String, Data> codeList = new Relation(new TreeMap(), TreeSet.class, null); 
    77     private Relation<String, String> countryToCodes = new Relation(new TreeMap(), TreeSet.class, null); 
     76    private Relation<String, Data> codeList = Relation.of(new TreeMap<String, Set<Data>>(), TreeSet.class, null); 
     77    private Relation<String, String> countryToCodes = Relation.of(new TreeMap<String, Set<String>>(), TreeSet.class, null); 
    7878 
    7979    public static class Data implements Comparable<Object> { 
  • trunk/tools/java/org/unicode/cldr/util/LenientDateParser.java

    r9589 r9592  
    729729        } 
    730730        final BestTimeZone bestTimeZone = new BestTimeZone(locale); 
    731         Relation<String, String> stringToZones = new Relation(new TreeMap(), TreeSet.class, bestTimeZone); 
     731        Relation<String, String> stringToZones = Relation.of(new TreeMap<String, Set<String>>(), TreeSet.class, bestTimeZone); 
    732732 
    733733        // final UTF16.StringComparator stringComparator = new UTF16.StringComparator(true, false, 0); 
     
    793793        // we walk through to see what can come before or after a separator, accumulating them all together 
    794794        FormatParser formatParser = new FormatParser(); 
    795         Map<String, EnumSet<Type>> beforeTypes = new HashMap(); 
    796         Map<String, EnumSet<Type>> afterTypes = new HashMap(); 
     795        Map<String, EnumSet<Type>> beforeTypes = new HashMap<String, EnumSet<Type>>(); 
     796        Map<String, EnumSet<Type>> afterTypes = new HashMap<String, EnumSet<Type>>(); 
    797797        EnumSet<Type> nonDateTypes = EnumSet.allOf(Type.class); 
    798798        nonDateTypes.removeAll(dateTypes); 
     
    811811        add(afterTypes, " ", timeTypes); 
    812812 
    813         Set<String> allSeparators = new HashSet(beforeTypes.keySet()); 
     813        Set<String> allSeparators = new HashSet<String>(beforeTypes.keySet()); 
    814814        allSeparators.addAll(afterTypes.keySet()); 
    815815        for (String item : allSeparators) { 
     
    931931        // add missing Etc zones 
    932932        canonicalZones = new TreeSet<String>(supplementalData.getCanonicalZones()); 
    933         Set zones = getAllGmtZones(); 
     933        Set<String> zones = getAllGmtZones(); 
    934934        zones.removeAll(canonicalZones); 
    935935        System.out.println("Missing GMT Zones: " + zones); 
     
    946946 
    947947    private static Set<String> getFirstMinusSecond(Set<String> first, Set<String> second) { 
    948         Set<String> difference = new TreeSet(first); 
     948        Set<String> difference = new TreeSet<String>(first); 
    949949        difference.removeAll(second); 
    950950        return difference; 
     
    11021102    }; 
    11031103 
    1104     private static LinkedHashSet getIcuEquivalentZones(String zoneID) { 
    1105         LinkedHashSet result = new LinkedHashSet(); 
     1104    private static LinkedHashSet<String> getIcuEquivalentZones(String zoneID) { 
     1105        LinkedHashSet<String> result = new LinkedHashSet<String>(); 
    11061106        final int count = TimeZone.countEquivalentIDs(zoneID); 
    11071107        for (int i = 0; i < count; ++i) { 
     
    11241124        } 
    11251125        formatParser.set(pattern); 
    1126         List list = formatParser.getItems(); 
     1126        List<Object> list = formatParser.getItems(); 
    11271127        List<Type> temp = new ArrayList<Type>(); 
    11281128        for (int i = 0; i < list.size(); ++i) { 
  • trunk/tools/java/org/unicode/cldr/util/LogicalGrouping.java

    r9589 r9592  
    140140 
    141141        PluralRules pluralRules = getPluralInfo(cldrFile).getPluralRules(); 
    142         String lastElement = parts.getElement(-1); 
    143142        parts.setAttribute(-1, "count", "0"); 
    144143        Set<Double> explicits = new HashSet<Double>(); 
  • trunk/tools/java/org/unicode/cldr/util/MapComparator.java

    r9589 r9592  
    8686    } 
    8787 
     88    @SuppressWarnings("unchecked") 
    8889    public MapComparator<K> add(K... data) { 
    8990        for (int i = 0; i < data.length; ++i) { 
     
    9596    private static final UnicodeSet numbers = new UnicodeSet("[\\-0-9.]").freeze(); 
    9697 
     98    @SuppressWarnings({ "unchecked", "rawtypes" }) 
    9799    public int compare(K a, K b) { 
    98100        if (false && (a.equals("lines") || b.equals("lines"))) { 
  • trunk/tools/java/org/unicode/cldr/util/MergeLists.java

    r9589 r9592  
    44import java.util.Arrays; 
    55import java.util.Collection; 
    6 import java.util.HashSet; 
    76import java.util.Iterator; 
    87import java.util.LinkedHashMap; 
     
    3736    } 
    3837 
     38    @SuppressWarnings("unchecked") 
    3939    public MergeLists<T> add(T... stuff) { 
    4040        return add(Arrays.asList(stuff)); 
  • trunk/tools/java/org/unicode/cldr/util/Pair.java

    r9589 r9592  
    7979    } 
    8080 
     81    @SuppressWarnings({ "rawtypes", "unchecked" }) 
    8182    public int compareTo(Object other) { 
    8283        Pair that = (Pair) other; 
  • trunk/tools/java/org/unicode/cldr/util/PathHeader.java

    r9589 r9592  
    2727import com.ibm.icu.dev.util.Relation; 
    2828import com.ibm.icu.impl.Row; 
    29 import com.ibm.icu.impl.Row.R2; 
    3029import com.ibm.icu.lang.UCharacter; 
    3130import com.ibm.icu.text.Collator; 
  • trunk/tools/java/org/unicode/cldr/util/PluralRanges.java

    r9589 r9592  
    11package org.unicode.cldr.util; 
    22 
    3 import java.util.EnumMap; 
    43import java.util.EnumSet; 
    54 
    6 import org.unicode.cldr.util.SupplementalDataInfo.PluralInfo; 
    75import org.unicode.cldr.util.SupplementalDataInfo.PluralInfo.Count; 
    86 
    97import com.ibm.icu.impl.Utility; 
    10 import com.ibm.icu.text.PluralRules; 
    11 import com.ibm.icu.text.PluralRules.FixedDecimal; 
    12 import com.ibm.icu.text.PluralRules.FixedDecimalRange; 
    13 import com.ibm.icu.text.PluralRules.FixedDecimalSamples; 
    14 import com.ibm.icu.text.PluralRules.SampleType; 
    158import com.ibm.icu.util.Freezable; 
    169import com.ibm.icu.util.Output; 
  • trunk/tools/java/org/unicode/cldr/util/PluralSnapshot.java

    r9589 r9592  
    6262 
    6363    Plurals[] plurals = new Plurals[LEN]; 
    64  
    65     private Integral integral; 
    6664 
    6765    private BitSet pluralsTransitionAt; 
     
    148146    PluralSnapshot(PluralRules pluralRules, Integral integral, BitSet pluralsTransitionAt) { 
    149147        this.pluralsTransitionAt = pluralsTransitionAt; 
    150         this.integral = integral; 
    151148        double offset = integral == Integral.integer ? 0 : 0.5; 
    152149        found = EnumSet.noneOf(Plurals.class); 
  • trunk/tools/java/org/unicode/cldr/util/RangeAbbreviator.java

    r9589 r9592  
    5252        // find common initial section 
    5353        int end1 = breaker1.last(); 
    54         int end2 = breaker2.last(); 
    5554        while (true) { 
    5655            breaker1.previous(); 
     
    6867            } 
    6968            end1 = current1; 
    70             end2 = current2; 
    7169        } 
    7270        return buffer.append(firstString.substring(0, end1)).append(separator).append(secondString.substring(start2)) 
  • trunk/tools/java/org/unicode/cldr/util/RegexLookup.java

    r9589 r9592  
    3030public class RegexLookup<T> implements Iterable<Map.Entry<Finder, T>> { 
    3131    private VariableReplacer variables = new VariableReplacer(); 
    32     private static final boolean DEBUG = true; 
    3332    private RegexTree<T> RTEntries; 
    3433    private Map<Finder, T> MEntries; 
  • trunk/tools/java/org/unicode/cldr/util/SimpleEquivalenceClass.java

    r9589 r9592  
    1010public class SimpleEquivalenceClass { 
    1111 
     12    @SuppressWarnings({ "unchecked", "rawtypes" }) 
    1213    public SimpleEquivalenceClass(Comparator c) { 
    1314        comparator = c; 
     
    1516    } 
    1617 
     18    @SuppressWarnings("rawtypes") 
    1719    private Map itemToSet; 
    1820 
     21    @SuppressWarnings("rawtypes") 
    1922    private Comparator comparator; 
    2023 
     24    @SuppressWarnings({ "rawtypes", "unchecked" }) 
    2125    public void add(Object a, Object b) { 
    2226        if (a == b) { 
  • trunk/tools/java/org/unicode/cldr/util/SimpleFactory.java

    r9589 r9592  
    2323    private volatile CLDRFile result; // used in handleMake 
    2424    private File sourceDirectories[]; 
    25     private String matchString; 
    2625    private Set<String> localeList = new TreeSet<String>(); 
     26    @SuppressWarnings("unchecked") 
    2727    private Map<String, CLDRFile>[] mainCache = new Map[DraftStatus.values().length]; 
     28    @SuppressWarnings("unchecked") 
    2829    private Map<String, CLDRFile>[] resolvedCache = new Map[DraftStatus.values().length]; 
    2930    { 
     
    7879    private SimpleFactory(File sourceDirectories[], String matchString, DraftStatus minimalDraftStatus) { 
    7980        this.sourceDirectories = sourceDirectories; 
    80         this.matchString = matchString; 
    8181        this.minimalDraftStatus = minimalDraftStatus; 
    8282        Matcher m = Pattern.compile(matchString).matcher(""); 
  • trunk/tools/java/org/unicode/cldr/util/SimpleXMLSource.java

    r9589 r9592  
    122122        synchronized (VALUE_TO_PATH_MUTEX) { 
    123123            if (VALUE_TO_PATH == null) { 
    124                 VALUE_TO_PATH = new Relation(new HashMap(), HashSet.class); 
     124                VALUE_TO_PATH = Relation.of(new HashMap<String, Set<String>>(), HashSet.class); 
    125125                for (Iterator<String> it = iterator(); it.hasNext();) { 
    126126                    String path = it.next(); 
  • trunk/tools/java/org/unicode/cldr/util/SpreadSheet.java

    r9589 r9592  
    1717    public static List<List<String>> convert(BufferedReader r) throws IOException { 
    1818        List<List<String>> result = new ArrayList<List<String>>(); 
    19         boolean inQuote = false; 
     19        // boolean inQuote = false; 
    2020        while (true) { 
    2121            String line = r.readLine(); 
  • trunk/tools/java/org/unicode/cldr/util/StandardCodes.java

    r9589 r9592  
    3333import org.unicode.cldr.draft.ScriptMetadata.IdUsage; 
    3434import org.unicode.cldr.util.Iso639Data.Type; 
     35import org.unicode.cldr.util.ZoneParser.RuleLine; 
    3536import org.unicode.cldr.util.ZoneParser.ZoneLine; 
    3637 
     
    169170        if (type.equals("currency")) 
    170171            return null; // no replacement codes for currencies 
    171         List data = getFullData(type, code); 
     172        List<String> data = getFullData(type, code); 
    172173        if (data == null) 
    173174            return null; 
     
    456457    private void loadPlatformLocaleStatus() { 
    457458        LocaleIDParser parser = new LocaleIDParser(); 
    458         platform_locale_level = new TreeMap(caseless); 
     459        platform_locale_level = new TreeMap<String, Map<String, Level>>(caseless); 
    459460        SupplementalDataInfo sd = SupplementalDataInfo.getInstance(); 
    460461        Set<String> defaultContentLocales = sd.getDefaultContentLocales(); 
     
    473474                if (line.length() == 0) 
    474475                    continue; 
    475                 List stuff = CldrUtility.splitList(line, ';', true); 
     476                List<String> stuff = CldrUtility.splitList(line, ';', true); 
    476477                String organization = (String) stuff.get(0); 
    477478 
     
    503504                    System.out.println("Warning: Level unknown on: " + line); 
    504505                } 
    505                 Map locale_status = (Map) platform_locale_level.get(organization); 
     506                Map<String, Level> locale_status = platform_locale_level.get(organization); 
    506507                if (locale_status == null) { 
    507                     platform_locale_level.put(organization, locale_status = new TreeMap()); 
     508                    platform_locale_level.put(organization, locale_status = new TreeMap<String, Level>()); 
    508509                } 
    509510                locale_status.put(locale, status); 
     
    546547        } 
    547548        // backwards compat hack 
    548         platform_locale_levelString = new TreeMap(caseless); 
     549        platform_locale_levelString = new TreeMap<String, Map<String, String>>(caseless); 
    549550        for (String platform : platform_locale_level.keySet()) { 
    550             Map<String, String> locale_levelString = new TreeMap(); 
     551            Map<String, String> locale_levelString = new TreeMap<String, String>(); 
    551552            platform_locale_levelString.put(platform, locale_levelString); 
    552553            Map<String, Level> locale_level = platform_locale_level.get(platform); 
     
    748749        } 
    749750 
    750         Map m = getZoneData(); 
    751         for (Iterator it = m.keySet().iterator(); it.hasNext();) { 
    752             String code = (String) it.next(); 
     751        Map<String, List<String>> m = getZoneData(); 
     752        for (Iterator<String> it = m.keySet().iterator(); it.hasNext();) { 
     753            String code = it.next(); 
    753754            add(CodeType.tzid, code, m.get(code).toString()); 
    754755        } 
     
    837838    } 
    838839 
    839     private List DELETED3166 = Collections.unmodifiableList(Arrays 
     840    private List<String> DELETED3166 = Collections.unmodifiableList(Arrays 
    840841        .asList(new String[] { "BQ", "BU", "CT", "DD", "DY", "FQ", "FX", "HV", 
    841842            "JT", "MI", "NH", "NQ", "NT", "PC", "PU", "PZ", "RH", "SU", "TP", 
    842843            "VD", "WK", "YD", "YU", "ZR" })); 
    843844 
    844     public List getOld3166() { 
     845    public List<String> getOld3166() { 
    845846        return DELETED3166; 
    846847    } 
    847848 
    848     private Map WorldBankInfo; 
     849    private Map<String, List<String>> WorldBankInfo; 
    849850 
    850851    public Map<String, List<String>> getWorldBankInfo() { 
    851852        if (WorldBankInfo == null) { 
    852853            List<String> temp = fillFromCommaFile("WorldBankInfo.txt", false); 
    853             WorldBankInfo = new HashMap(); 
     854            WorldBankInfo = new HashMap<String, List<String>>(); 
    854855            for (String line : temp) { 
    855856                List<String> row = CldrUtility.splitList(line, ';', true); 
     
    863864    } 
    864865 
    865     Set moribundLanguages; 
     866    Set<String> moribundLanguages; 
    866867 
    867868    public Set<String> getMoribundLanguages() { 
    868869        if (moribundLanguages == null) { 
    869             List temp = fillFromCommaFile("moribund_languages.txt", true); 
     870            List<String> temp = fillFromCommaFile("moribund_languages.txt", true); 
    870871            moribundLanguages = new TreeSet<String>(); 
    871872            moribundLanguages.addAll(temp); 
     
    12271228     * @deprecated 
    12281229     */ 
    1229     public Map getCountryToZoneSet() { 
     1230    public Map<String, Set<String>> getCountryToZoneSet() { 
    12301231        return zoneParser.getCountryToZoneSet(); 
    12311232    } 
     
    12341235     * @deprecated 
    12351236     */ 
    1236     public List getDeprecatedZoneIDs() { 
     1237    public List<String> getDeprecatedZoneIDs() { 
    12371238        return zoneParser.getDeprecatedZoneIDs(); 
    12381239    } 
     
    12411242     * @deprecated 
    12421243     */ 
    1243     public Comparator getTZIDComparator() { 
     1244    public Comparator<String> getTZIDComparator() { 
    12441245        return zoneParser.getTZIDComparator(); 
    12451246    } 
     
    12481249     * @deprecated 
    12491250     */ 
    1250     public Map getZoneLinkNew_OldSet() { 
     1251    public Map<String, Set<String>> getZoneLinkNew_OldSet() { 
    12511252        return zoneParser.getZoneLinkNew_OldSet(); 
    12521253    } 
     
    12551256     * @deprecated 
    12561257     */ 
    1257     public Map getZoneLinkold_new() { 
     1258    public Map<String, String> getZoneLinkold_new() { 
    12581259        return zoneParser.getZoneLinkold_new(); 
    12591260    } 
     
    12691270     * @deprecated 
    12701271     */ 
    1271     public Map getZoneToCounty() { 
     1272    public Map<String, String> getZoneToCounty() { 
    12721273        return zoneParser.getZoneToCounty(); 
    12731274    } 
     
    13061307        } 
    13071308        IdUsage idUsage = info.idUsage; 
    1308         return idUsage != IdUsage.EXCLUSION && idUsage != idUsage.UNKNOWN; 
     1309        return idUsage != IdUsage.EXCLUSION && idUsage != IdUsage.UNKNOWN; 
    13091310    } 
    13101311 
  • trunk/tools/java/org/unicode/cldr/util/StateDictionary.java

    r9589 r9592  
    7777        Set<Pair<Integer, String>> sorted = new TreeSet<Pair<Integer, String>>(); 
    7878        for (T item : map.keySet()) { 
    79             sorted.add(new Pair(map.get(item), item.toString())); 
     79            sorted.add(new Pair<Integer, String>(map.get(item), item.toString())); 
    8080        } 
    8181        for (Pair<Integer, String> pair : sorted) { 
     
    518518        public String debugShow() { 
    519519            rowsSeen.clear(); 
    520             Counter debugCounter = new Counter(); 
     520            Counter<Integer> debugCounter = new Counter<Integer>(); 
    521521            getDebugWords(0, 0, builtBaseRow, Integer.MAX_VALUE); 
    522522            for (Row row : builtRows) { 
  • trunk/tools/java/org/unicode/cldr/util/StateDictionaryBuilder.java

    r9589 r9592  
    5858    } 
    5959 
    60     public StateDictionaryBuilder setIntMapFactory(IntMapFactory<T> intMapFactory) { 
     60    public StateDictionaryBuilder<T> setIntMapFactory(IntMapFactory<T> intMapFactory) { 
    6161        this.intMapFactory = intMapFactory; 
    6262        return this; 
     
    7373    } 
    7474 
    75     public StateDictionaryBuilder setByteConverter(StringByteConverter byteConverter) { 
     75    public StateDictionaryBuilder<T> setByteConverter(StringByteConverter byteConverter) { 
    7676        this.byteConverter = byteConverter; 
    7777        return this; 
  • trunk/tools/java/org/unicode/cldr/util/SupplementalData.java

    r9589 r9592  
    3434    private Document supplementalDocument = null; 
    3535    private Document supplementalMetaDocument = null; 
    36     private SupplementalDataInfo sdi = null; 
    3736 
    3837    static final String SPLIT_PATTERN = "[, \t\u00a0\\s]+"; // whitespace 
     
    5857            throw new InternalError("Can't parse metadata: " + pathName + "/supplementalMetadata.xml"); 
    5958        } 
    60         sdi = SupplementalDataInfo.getInstance(pathName); 
    6159    } 
    6260 
  • trunk/tools/java/org/unicode/cldr/util/SupplementalDataInfo.java

    r9589 r9592  
    3737import org.unicode.cldr.util.SupplementalDataInfo.BasicLanguageData.Type; 
    3838import org.unicode.cldr.util.SupplementalDataInfo.NumberingSystemInfo.NumberingSystemType; 
    39 import org.unicode.cldr.util.SupplementalDataInfo.PluralInfo; 
    4039import org.unicode.cldr.util.SupplementalDataInfo.PluralInfo.Count; 
    4140 
  • trunk/tools/java/org/unicode/cldr/util/TestStateDictionaryBuilder.java

    r9589 r9592  
    230230    } 
    231231 
     232    @SuppressWarnings("unchecked") 
    232233    private void testWithUnicodeNames() { 
    233234        UnicodeSet testSet = new UnicodeSet( 
     
    385386    } 
    386387 
     388    @SuppressWarnings("unchecked") 
    387389    private void addToBoth(CharSequence string, int i) { 
    388390        baseMapping.put(string, (T) (i + "/" + string)); 
  • trunk/tools/java/org/unicode/cldr/util/Unlocode.java

    r9589 r9592  
    33import java.io.BufferedReader; 
    44import java.io.IOException; 
    5 import java.io.Reader; 
    65import java.nio.charset.Charset; 
    7 import java.util.ArrayList; 
    86import java.util.Arrays; 
    97import java.util.Collection; 
    108import java.util.Collections; 
    11 import java.util.EnumMap; 
    129import java.util.HashMap; 
    1310import java.util.HashSet; 
    1411import java.util.LinkedHashSet; 
    15 import java.util.List; 
    1612import java.util.Locale; 
    1713import java.util.Map; 
     
    2218 
    2319import org.unicode.cldr.draft.FileUtilities; 
    24 import org.unicode.cldr.tool.CLDRModify; 
    25 import org.unicode.cldr.tool.ConvertLanguageData; 
    2620import org.unicode.cldr.tool.CountryCodeConverter; 
    2721import org.unicode.cldr.unittest.TestAll.TestInfo; 
    2822import org.unicode.cldr.util.ChainedMap.M3; 
    2923 
    30 import com.ibm.icu.dev.util.BagFormatter; 
    3124import com.ibm.icu.dev.util.CollectionUtilities; 
    3225import com.ibm.icu.dev.util.Relation; 
     
    5043        } 
    5144        public Iso3166_2Data(Collection<String> names) { 
    52             this.names = Collections.unmodifiableSet(new LinkedHashSet(names)); 
     45            this.names = Collections.unmodifiableSet(new LinkedHashSet<String>(names)); 
    5346        } 
    5447        @Override 
     
    6659        @Override 
    6760        public Iso3166_2Data merge(Iso3166_2Data b) { 
    68             LinkedHashSet set = new LinkedHashSet(names); 
     61            LinkedHashSet<String> set = new LinkedHashSet<String>(names); 
    6962            set.addAll(b.names); 
    7063            return new Iso3166_2Data(set); 
     
    8578        public LocodeData(String locode, Collection<String> names, String subdivision, float north, float east) { 
    8679            this.locode = locode; 
    87             this.names = Collections.unmodifiableSet(new LinkedHashSet(names)); 
     80            this.names = Collections.unmodifiableSet(new LinkedHashSet<String>(names)); 
    8881            this.subdivision = subdivision; 
    8982            this.north = north; 
     
    122115                && north == other.north 
    123116                && east == other.east) { 
    124                 LinkedHashSet set = new LinkedHashSet(names); 
     117                LinkedHashSet<String> set = new LinkedHashSet<String>(names); 
    125118                set.addAll(other.names); 
    126119                return new LocodeData(locode, set, subdivision, north, east); 
     
    308301            } 
    309302            line = line.trim(); 
    310             if (line.contains("Hagåtña")) { 
    311                 int x = 0; 
    312             } 
    313303            if (line.isEmpty()) { 
    314304                continue; 
     
    399389 
    400390    public static String removeParens(String name, Output<String> tempOutput) { 
    401         String orginal = name; 
    402391        int paren = name.indexOf("("); 
    403392        tempOutput.value = null; 
     
    677666            errors2.add("** No matching record for\t" + countryName + "\t" + countryCode + "\t" + cityName); 
    678667        } else { 
    679             Set<LocodeData> rem = new LinkedHashSet(); 
     668            Set<LocodeData> rem = new LinkedHashSet<LocodeData>(); 
    680669            for (LocodeData x : locodeDatas) { 
    681670                if (x.locode.startsWith(countryCode)) { 
  • trunk/tools/java/org/unicode/cldr/util/VariantFolder.java

    r9589 r9592  
    4747    // {0,3}} 
    4848 
     49    @SuppressWarnings("unchecked") 
    4950    public Set<String> getClosure(String source) { 
    5051        int stringLength = source.length(); 
  • trunk/tools/java/org/unicode/cldr/util/VerifyZones.java

    r9589 r9592  
    7171 
    7272    public static class ZoneFormats { 
    73         private String regionFormat; 
    74         private String fallbackFormat; 
    7573        private String gmtFormat; 
    7674        private String hourFormat; 
     
    9290        public ZoneFormats set(CLDRFile cldrFile) { 
    9391            this.cldrFile = cldrFile; 
    94             regionFormat = cldrFile.getWinningValue("//ldml/dates/timeZoneNames/regionFormat"); 
    95             fallbackFormat = cldrFile.getWinningValue("//ldml/dates/timeZoneNames/fallbackFormat"); 
    9692 
    9793            gmtFormat = cldrFile.getWinningValue("//ldml/dates/timeZoneNames/gmtFormat"); 
     
    220216 
    221217    private static void addRow(String metaZone, String tz_string, int orderInMetazone) { 
    222         if (tz_string.contains("Jamaica") || tz_string.contains("Iqaluit")) { 
    223             int x = 3; 
    224         } 
    225218        TimeZone currentZone = TimeZone.getTimeZone(tz_string); 
    226219        String container = PathHeader.getMetazonePageTerritory(metaZone); 
     
    264257    } 
    265258 
     259    @SuppressWarnings("unused") 
    266260    private static <T> void vennSets(Set<T> first, Set<T> second, Set<T> common) { 
    267261        common.clear(); 
  • trunk/tools/java/org/unicode/cldr/util/VettingViewer.java

    r9589 r9592  
    215215    static final OutdatedPaths outdatedPaths = new OutdatedPaths(); 
    216216 
    217     private static final UnicodeSet NEEDS_PERCENT_ESCAPED = new UnicodeSet("[[\\u0000-\\u009F]-[a-zA-z0-9]]"); 
     217//    private static final UnicodeSet NEEDS_PERCENT_ESCAPED = new UnicodeSet("[[\\u0000-\\u009F]-[a-zA-z0-9]]"); 
    218218//    private static final Transform<String, String> percentEscape = new Transform<String, String>() { 
    219219//        @Override 
  • trunk/tools/java/org/unicode/cldr/util/With.java

    r9589 r9592  
    106106     * @return Iterable, for use in for loops, etc. 
    107107     */ 
     108    @SuppressWarnings("unchecked") 
    108109    public static <V> V[] array(V... values) { 
    109110        return values; 
     
    154155     * @return Iterable, for use in for loops, etc. 
    155156     */ 
     157    @SuppressWarnings("unchecked") 
    156158    public static <V> With<V> in(Iterator<V>... iterators) { 
    157159        return new With<V>().and(iterators); 
     
    171173     * @return Iterable, for use in for loops, etc. 
    172174     */ 
     175    @SuppressWarnings("unchecked") 
    173176    public static <V> With<V> in(Iterable<V>... iterables) { 
    174177        return new With<V>().and(iterables); 
     
    188191     * @return Iterable, for use in for loops, etc. 
    189192     */ 
     193    @SuppressWarnings("unchecked") 
    190194    public static <V> With<V> in(V... items) { 
    191195        return new With<V>().and(items); 
     
    199203     * @return 
    200204     */ 
     205    @SuppressWarnings("unchecked") 
    201206    public static <T> Iterable<T> in(SimpleIterator<T>... sources) { 
    202207        return new With<T>().and(sources); 
     
    206211    } 
    207212 
     213    @SuppressWarnings("unchecked") 
    208214    public With<V> and(Iterator<V>... iterators) { 
    209215        for (Iterator<V> iterator : iterators) { 
     
    218224    } 
    219225 
     226    @SuppressWarnings("unchecked") 
    220227    public With<V> and(Iterable<V>... iterables) { 
    221228        for (Iterable<V> iterable : iterables) { 
     
    225232    } 
    226233 
     234    @SuppressWarnings("unchecked") 
    227235    public With<V> and(SimpleIterator<V>... iterators) { 
    228236        for (SimpleIterator<V> iterator : iterators) { 
Note: See TracChangeset for help on using the changeset viewer.