/** Update elemVec with the list of elements that are part of the this contentModel. */ public void getElements(Vector<Element> elemVec) { switch (type) { case '*': case '?': case '+': ((ContentModel) content).getElements(elemVec); break; case ',': case '|': case '&': for (ContentModel m = (ContentModel) content; m != null; m = m.next) { m.getElements(elemVec); } break; default: elemVec.addElement((Element) content); } }