< prev index next >

make/jdk/src/classes/build/tools/generatecharacter/PropList.java

Print this page
rev 56092 : imported patch 8229831

*** 1,7 **** /* ! * Copyright (c) 2011, 2013, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. Oracle designates this --- 1,7 ---- /* ! * Copyright (c) 2011, 2019, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. Oracle designates this
*** 29,39 **** import java.util.*; import java.io.*; /** * A PropList object contains the lists of code points that have ! * the same Unicode property defined in PropList.txt * * @author Xueming Shen */ public class PropList { --- 29,40 ---- import java.util.*; import java.io.*; /** * A PropList object contains the lists of code points that have ! * the same Unicode property defined in PropList.txt and ! * DerivedCoreProperties.txt * * @author Xueming Shen */ public class PropList {
*** 49,60 **** public Set<String> names() { return propMap.keySet(); } ! private Map<String, ArrayList<Integer>> propMap = ! new LinkedHashMap<String, ArrayList<Integer>>(); private PropList(File file, int plane) throws IOException { int i, j; BufferedReader sbfr = new BufferedReader(new FileReader(file)); --- 50,66 ---- public Set<String> names() { return propMap.keySet(); } ! public void putAll(PropList pl) { ! pl.names().stream() ! .forEach(name -> propMap.put(name, pl.codepoints(name))); ! } ! ! private Map<String, List<Integer>> propMap = ! new LinkedHashMap<String, List<Integer>>(); private PropList(File file, int plane) throws IOException { int i, j; BufferedReader sbfr = new BufferedReader(new FileReader(file));
*** 76,86 **** String name = m.group(3); start &= 0xffff; end &= 0xffff; ! ArrayList<Integer> list = propMap.get(name); if (list == null) { list = new ArrayList<Integer>(); propMap.put(name, list); } while (start <= end) --- 82,92 ---- String name = m.group(3); start &= 0xffff; end &= 0xffff; ! List<Integer> list = propMap.get(name); if (list == null) { list = new ArrayList<Integer>(); propMap.put(name, list); } while (start <= end)
< prev index next >