pattersonkl / google-refine

Automatically exported from code.google.com/p/google-refine
0 stars 0 forks source link

Tighten up sorting API #277

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
The children of the Criterion class can through ClassCastExceptions because 
different parts of the implementation disagree over what the rules are.  One 
solution to this would be to use generics in a fashion similar to the attached 
patch, but the current implementation depends on adhoc polymorphism to store an 
EvalError object of a different type.

Another possibility would be go the route used by Java Collators and have a 
CollationKey type which knows how to do its own comparison.

A third, less satisfactory, option is to just clean up the current code without 
changing the API and depend on convention and documentation to keep future 
developers from introducing problems.

Original issue reported on code.google.com by tfmorris on 12 Dec 2010 at 6:52

Attachments:

GoogleCodeExporter commented 8 years ago
This is related to the problem that was reported in issue 257.

Original comment by tfmorris on 12 Dec 2010 at 7:15