Fast plotting

A discussion forum for JFreeChart (a 2D chart library for the Java platform).
zany
Posts: 20
Joined: Mon Mar 15, 2004 2:36 pm
Location: Germany

No need to deprecate get*Value()

Post by zany » Thu May 06, 2004 1:50 pm

david.gilbert wrote: the isMissing() method is redundant. Its purpose is only to determine the meaning of getY() when it returns Double.NaN [...] why not get the same information from the getYValue() method - by checking whether it returns 'null' or a Number object
I really appreciate the steps towards primitive data handling. I've come across the mentioned issues with big datasets too.

Like David pointed out very well there should be no need for some isUnknown() method.
If there is missing/unknonwn data the only choice for a primitive to be returned is NaN and more info is needed. That's where the object-returning methods come handy. I can think of more than missing and unknown data (distinguished by NaN vs. null perhaps). Think about spaces where e.g. infinite values are possible i.e. Double.POSITVE_INFINITY)

That way get*Value() would return null for every NaN that is not really NaN but unknown with no overhead. And the correct object in other cases like boundary values, real NaN, supplementing conventional objects and the like.

Most likely not the complete picture but it seems to merge the benefits of object-returning methods with fast primitives for now.

Locked