Hi @fwoon,
Based on the “Object cannot be converted to x” errors you got, I assume you aren’t using generics in your iterators, lists, and collections. If this is indeed the case, either you cast them or use generics. Checking the errors you got:
ChartData.java:229: error: incompatible types: Object cannot be converted to Element
final Element element = iterator.next();
If iterator was initialized without generics, then you have to cast the object being returned by Iterator#next as an Element.
I believe it is the same with this error
symbol: method parse(String)
location: class Object
ChartData.java:521: error: cannot find symbol
final Date date = iterator.next().parse(value);
You might be expecting iterator.next() returns a Date object, hence, you used Date#parse, but without casting it as (Date) or using generics, it will be treated as an Object and Object class does not have a parse method.
Without seeing your entire class, these are mere assumptions based on the compilation errors you got.
Hope this helps.
Ian