Code example for Collection

Methods: contains

0
		} 
		return false; 
	} 
	 
	private boolean isRejectedElement(Object elem) {
		return (fRejectedElements != null) && fRejectedElements.contains(elem);
	} 
	 
	private boolean isValid(Object[] selection) {
		if (selection.length == 0) {
			return false; 
		} 
		 
		if (!fAllowMultipleSelection && selection.length != 1) {
			return false; 
		} 
		 
		for (int i= 0; i < selection.length; i++) {
			Object o= selection[i];	
			if (!isOfAcceptedType(o) || isRejectedElement(o)) {