20 package net.sf.gridarta.model.archetypetype;
22 import java.util.ArrayList;
23 import java.util.Collections;
24 import java.util.Comparator;
25 import java.util.HashMap;
26 import java.util.Iterator;
27 import java.util.LinkedHashMap;
28 import java.util.List;
30 import java.util.TreeMap;
32 import org.jetbrains.annotations.NotNull;
33 import org.jetbrains.annotations.Nullable;
68 private final Map<String, ArchetypeTypeList>
listTable =
new HashMap<>();
75 private final Map<String, AttributeBitmask>
bitmaskTable =
new HashMap<>();
90 public int compare(@NotNull
final String o1, @NotNull
final String o2) {
94 return index2 ==
null ? o1.compareTo(o2) : +1;
96 return index2 ==
null ? -1 : index1.compareTo(index2);
107 final String typeName = archetypeType.getTypeName();
109 if (typeName.equals(
"Misc")) {
149 if (archetypeType.matches(baseObject)) {
150 return archetypeType;
270 final StringBuilder sb =
new StringBuilder();
271 final Map<String, ArchetypeType> sortedArchetypeTypes =
new TreeMap<>(
archetypeTypeNames);
272 for (
final ArchetypeType archetypeType : sortedArchetypeTypes.values()) {
273 archetypeType.toString(sb);
275 return sb.toString();