System.arraycopy(selectedArray, 0, selectedItems, 0, numOfItems);
for (int i = 0; i < numOfItems; i++) { setSelectedIndex(i, selectedArray[i]); }
  public void setSelectedFlags(boolean[] selectedArray)  {		if (selectedArray == null) {			throw new NullPointerException();		}		if (selectedArray.length < numOfItems) {			throw new NullPointerException();		}		if (choiceType == Choice.EXCLUSIVE) {			boolean performed = false;			for (int i = 0; i < numOfItems; i++) {				if (selectedArray[i]) {					setSelectedIndex(i, true);					performed = true;					break;				}			}			if (!performed) {				setSelectedIndex(0, true);			}		} else if (choiceType == Choice.MULTIPLE) {      System.arraycopy(selectedArray, 0, selectedItems, 0, numOfItems);		}  }