SortedSet<PuzzlePiece> elements = basenameElementsMap.get(basename);
if (elements == null) {
elements = new TreeSet<PuzzlePiece>();
basenameElementsMap.put(basename, elements);
}
QNamedPuzzleComponent subelement = model.getElement(elementname);
if (subelement != null) {
if (subelement instanceof Collection) {
elements.addAll((Collection) subelement);
}
else {