langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/util/IndexBuilder.java
equal
deleted
inserted
replaced
49 |
49 |
50 /** |
50 /** |
51 * Mapping of each Unicode Character with the member list containing |
51 * Mapping of each Unicode Character with the member list containing |
52 * members with names starting with it. |
52 * members with names starting with it. |
53 */ |
53 */ |
54 private Map<Character,List<Doc>> indexmap = new HashMap<Character,List<Doc>>(); |
54 private Map<Character,List<Doc>> indexmap = new HashMap<>(); |
55 |
55 |
56 /** |
56 /** |
57 * Don't generate deprecated information if true. |
57 * Don't generate deprecated information if true. |
58 */ |
58 */ |
59 private boolean noDeprecated; |
59 private boolean noDeprecated; |
147 protected void buildIndexMap(RootDoc root) { |
147 protected void buildIndexMap(RootDoc root) { |
148 PackageDoc[] packages = root.specifiedPackages(); |
148 PackageDoc[] packages = root.specifiedPackages(); |
149 ClassDoc[] classes = root.classes(); |
149 ClassDoc[] classes = root.classes(); |
150 if (!classesOnly) { |
150 if (!classesOnly) { |
151 if (packages.length == 0) { |
151 if (packages.length == 0) { |
152 Set<PackageDoc> set = new HashSet<PackageDoc>(); |
152 Set<PackageDoc> set = new HashSet<>(); |
153 for (ClassDoc aClass : classes) { |
153 for (ClassDoc aClass : classes) { |
154 PackageDoc pd = aClass.containingPackage(); |
154 PackageDoc pd = aClass.containingPackage(); |
155 if (pd != null && pd.name().length() > 0) { |
155 if (pd != null && pd.name().length() > 0) { |
156 set.add(pd); |
156 set.add(pd); |
157 } |
157 } |
200 '*' : |
200 '*' : |
201 Character.toUpperCase(name.charAt(0)); |
201 Character.toUpperCase(name.charAt(0)); |
202 Character unicode = ch; |
202 Character unicode = ch; |
203 List<Doc> list = indexmap.get(unicode); |
203 List<Doc> list = indexmap.get(unicode); |
204 if (list == null) { |
204 if (list == null) { |
205 list = new ArrayList<Doc>(); |
205 list = new ArrayList<>(); |
206 indexmap.put(unicode, list); |
206 indexmap.put(unicode, list); |
207 } |
207 } |
208 list.add(element); |
208 list.add(element); |
209 } |
209 } |
210 } |
210 } |