Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
 package bpiwowar.argparser.handlers;
 
 
The argument is a set of characters

Author(s):
Benjamin Piwowarski
public class CharSetHandler extends GenericObjectsHandler {
	public CharSetHandler(Object objectField field)
		super(objectfieldArrayList.class);
		if (!Collection.class.isAssignableFrom(field.getType()))
					"Field %s is not a collection",
					field);
		// TODO: check it implements Collection<? extends String>
		// Type type = field.getGenericType();
	}
	protected Object process(ArgParser argParserString chars)
		try {
			for (int i = chars.length() - 1; i >= 0; i--)
				set.add(chars.charAt(i));
			return set;
catch (RuntimeException e) {
			throw e;
catch (Exception e) {
			throw new StringScanException(e);
		}
	}
New to GrepCode? Check out our FAQ X