57 |
|
|
58 |
import java.text.MessageFormat; |
import java.text.MessageFormat; |
59 |
|
|
60 |
|
import java.util.ArrayList; |
61 |
import java.util.Arrays; |
import java.util.Arrays; |
62 |
|
import java.util.Collections; |
63 |
import java.util.Comparator; |
import java.util.Comparator; |
64 |
import java.util.HashMap; |
import java.util.HashMap; |
65 |
import java.util.Iterator; |
import java.util.Iterator; |
572 |
implements Comparable |
implements Comparable |
573 |
{ |
{ |
574 |
private String name; |
private String name; |
575 |
|
private String lowerName; |
576 |
|
|
577 |
public IndexKey(String name) |
public IndexKey(String name) |
578 |
{ |
{ |
579 |
this.name = name; |
this.name = name; |
580 |
|
this.lowerName = name.toLowerCase(); |
581 |
} |
} |
582 |
|
|
583 |
public boolean equals(Object other) |
public boolean equals(Object other) |
584 |
{ |
{ |
585 |
return false; |
return this.lowerName.equals(((IndexKey)other).lowerName); |
586 |
|
} |
587 |
|
|
588 |
|
public int hashCode() |
589 |
|
{ |
590 |
|
return lowerName.hashCode(); |
591 |
} |
} |
592 |
|
|
593 |
public int compareTo(Object other) |
public int compareTo(Object other) |
594 |
{ |
{ |
595 |
return name.toLowerCase().compareTo(((IndexKey)other).name.toLowerCase()); |
return lowerName.compareTo(((IndexKey)other).lowerName); |
596 |
} |
} |
597 |
|
|
598 |
public String getName() |
public String getName() |
609 |
categorizedIndex = new LinkedHashMap(); |
categorizedIndex = new LinkedHashMap(); |
610 |
|
|
611 |
Map indexMap = getIndexByName(); |
Map indexMap = getIndexByName(); |
612 |
Iterator it = indexMap.keySet().iterator(); |
LinkedList keys = new LinkedList(); //indexMap.keySet().size()); |
613 |
|
keys.addAll(indexMap.keySet()); |
614 |
|
Collections.sort(keys); |
615 |
|
Iterator it = keys.iterator(); //indexMap.keySet().iterator(); |
616 |
char previousCategoryLetter = '\0'; |
char previousCategoryLetter = '\0'; |
617 |
Character keyLetter = null; |
Character keyLetter = null; |
618 |
while (it.hasNext()) { |
while (it.hasNext()) { |
641 |
|
|
642 |
// Collect index |
// Collect index |
643 |
|
|
644 |
indexByName = new TreeMap(); |
indexByName = new HashMap(); //TreeMap(); |
645 |
|
|
646 |
// Add packages to index |
// Add packages to index |
647 |
|
|
1192 |
ClassDoc superInterfaceDoc = (ClassDoc)superIt.next(); |
ClassDoc superInterfaceDoc = (ClassDoc)superIt.next(); |
1193 |
InterfaceRelation superRelation |
InterfaceRelation superRelation |
1194 |
= (InterfaceRelation)interfaceRelations.get(superInterfaceDoc); |
= (InterfaceRelation)interfaceRelations.get(superInterfaceDoc); |
1195 |
superRelation.subInterfaces.add(interfaceDoc); |
if (null != superRelation) { |
1196 |
|
superRelation.subInterfaces.add(interfaceDoc); |
1197 |
|
} |
1198 |
} |
} |
1199 |
} |
} |
1200 |
|
|
1329 |
if (null != relation) { |
if (null != relation) { |
1330 |
result.addAll(relation.superInterfaces); |
result.addAll(relation.superInterfaces); |
1331 |
} |
} |
|
else { |
|
|
System.err.println("no relation for interface " + interfaces[i]); |
|
|
} |
|
1332 |
} |
} |
1333 |
} |
} |
1334 |
|
|