Esempio n. 1
0
  public void addElement(Object element) {
    if (!(element instanceof ChoiceItem))
      throw new IllegalArgumentException(
          "element has to be of type ChoiceItem, but is of type " + element.getClass().getName());

    super.addElement(element);
  }