Code example for ParsePosition

Methods: setIndex

0
 
	@Override 
	public Object parseObject(String source, ParsePosition pos) {
		if (source.indexOf(".") > -1) {
			EmailAddress value = new EmailAddress(source);
			pos.setIndex(value.getEmailAddress().length());
			return value;
		}  
		return source;
	} 
 
}