Hi Jules,

On Thu, Jul 22, 2010 at 2:22 PM, Jules Kerssemakers
<[email protected]> wrote:
> To be more exact, the entire IChemObjectReader interface does not
> specify _any_ "read" method whatsoever (at least in cdk v1.3.5, v1.2.5
> seems to lack one either).

This is because there are two ways of reading:

1. a normal, *simple* reader, with a read() method
2. an interating reader, with hasNext(), next()

> Now I can understand that method/interface signatures change over
> time, Rajarshi even specifically warns some of his code snippets may
> be outdated, but why on earth would an interface labeled
> "...ObjectReader" NOT specify a "read" method. This is so
> counter-intuitive it makes my brain hurt..

Please file me a bug report to extend the JavaDoc to explain the above split up.

> Of course the individual subclasses have proper read methods, but with
> the interface lacking the common method, the entire pattern of the
> ReaderFactory becomes pointless.

The reader factory should actually indeed return
ISimpleChemObjectReader... OK, that would be a second bug.

Egon

-- 
Post-doc @ Uppsala University
Proteochemometrics / Bioclipse Group of Prof. Jarl Wikberg
Homepage: http://egonw.github.com/
Blog: http://chem-bla-ics.blogspot.com/
PubList: http://www.citeulike.org/user/egonw/tag/papers

------------------------------------------------------------------------------
This SF.net email is sponsored by Sprint
What will you do first with EVO, the first 4G phone?
Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first
_______________________________________________
Cdk-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/cdk-user

Reply via email to