public void process(List<String> argumentList) throws InvalidArgumentsException {
		List<String> remaining = new ArrayList<String>();
		for (PushBackIterator iter = new PushBackIteratorImpl(argumentList.iterator()); iter.hasNext();) {
			String current = (String) iter.next();
			if (current.startsWith("-")) {
				if (current.startsWith("--")) {
					String attributeName = current.substring(2);
					boolean processed = false;
					for (Iterator iterator = longSingleNamedAttributeProcessors
							.iterator(); iterator.hasNext();) {
						SingleNamedAttributeProcessor processor = (SingleNamedAttributeProcessor) iterator
								.next();
						if (processor.handles(attributeName)) {
							processor.process(iter);
							processed = true;
						}
					}	
					if (!processed) {
						remaining.add(current);
					}
				} else {
					String attributeName = current.substring(1);
					boolean processed = false;
					for (Iterator iterator = singleNamedAttributeProcessors
							.iterator(); iterator.hasNext();) {
						SingleNamedAttributeProcessor processor = (SingleNamedAttributeProcessor) iterator
								.next();
						if (processor.handles(attributeName)) {
							processor.process(iter);
							processed = true;
						}
					}	
					if (!processed) {
						remaining.add(current);
					}
				}
			} else {
				remaining.add(current);
			}		
		}
		argumentList.clear();
		argumentList.addAll(remaining);
	}
public void process ( List < String > argumentList ) throws InvalidArgumentsException { List < String > remaining = new ArrayList < String > ( ) ; for ( PushBackIterator iter = new PushBackIteratorImpl ( argumentList . iterator ( ) ) ; iter . hasNext ( ) ; ) { String current = ( String ) iter . next ( ) ; if ( current . startsWith ( "-" ) ) { if ( current . startsWith ( "--" ) ) { String attributeName = current . substring ( 2 ) ; boolean processed = false ; for ( Iterator iterator = longSingleNamedAttributeProcessors . iterator ( ) ; iterator . hasNext ( ) ; ) { SingleNamedAttributeProcessor processor = ( SingleNamedAttributeProcessor ) iterator . next ( ) ; if ( processor . handles ( attributeName ) ) { processor . process ( iter ) ; processed = true ; } } if ( ! processed ) { remaining . add ( current ) ; } } else { String attributeName = current . substring ( 1 ) ; boolean processed = false ; for ( Iterator iterator = singleNamedAttributeProcessors . iterator ( ) ; iterator . hasNext ( ) ; ) { SingleNamedAttributeProcessor processor = ( SingleNamedAttributeProcessor ) iterator . next ( ) ; if ( processor . handles ( attributeName ) ) { processor . process ( iter ) ; processed = true ; } } if ( ! processed ) { remaining . add ( current ) ; } } } else { remaining . add ( current ) ; } } argumentList . clear ( ) ; argumentList . addAll ( remaining ) ; }
@throws InvalidArgumentsException
@see org.wymiwyg.commons.util.arguments.ArgumentProcessor#process(java.util.List)