This content has been marked as final. Show 4 replies
Hi John, thanks for your answer! But...
void set(double d);
aren't implementing the WritableObjectValue interface... You can't parameterize the WritableObjectValue interface with a primitive type (WritableObjectValue<double>) :)
And I see that the DoubleProperty is only implementing the WritableValue interface (and not the WritableObjectValue interface).
This is a quite confusing... I mean, WritableObjectValue extends WritableValue to add two new methods (get/set) that are similar to the ones already defined in it's ancestor (getValue/setValue)?
I can't see any good reason to have a WritableObjectValue interface... and the javadoc doesn't help answering that question either :/
Edited by: 931106 on Apr 30, 2012 1:51 PM
There is no big mystery I think. It does this for all the types; there is also WritableStringValue, WritableBooleanValue, etc.. and finally there is WritableObjectValue (for the parametrized case). It is just consistent.
For the primitive types, this makes sense as it saves some unneeded autoboxing, but for the Object case it is the same as the existing methods - but it is consistent with the pattern atleast.
PS.: why is this board blocking me from posting "b o x i n g"
Edited by: john16384 on May 1, 2012 12:18 AM