Forums

F.A.Q. F.A.Q.    Register Register    Login Login    Home Home
Search Search
SBML Discussions » jsbml-development » getters and Double or Integer objects
Show: Today's Posts  :: Message Navigator
| Subscribe to topic 
Return to the default flat view Create a new topic Submit Reply
AuthorTopic
Andreas Dräger


Posts: 273
Registered:
June 2006
getters and Double or Integer objects 18 Dec '09 06:32 Go to previous message

Hi all,

We've now changed all values that were ints or doubles in previous
versions to Integer or Double. And of course, a method that returns an
int also takes an Integer object if compiled with the latest Java
compiler. However, it would be better to write

public int getMyValue() {
return isSetMyValue() ? myValue.intValue() : 0;
}

I mean, *.intValue() is important because the method does not return an
Integer object but an int value. The same holds true for Double
objects/double values.

If I see things like this, I'll try to change it but I'd like to point
out that it is better to use this method.

Cheers
Andreas

--
Dipl.-Bioinform. Andreas Dräger
Eberhard Karls University Tübingen
Center for Bioinformatics (ZBIT)
Sand 1
72076 Tübingen
Germany

Phone: +49-7071-29-70436
Fax: +49-7071-29-5091
____________________________________________________________
To manage your jsbml-development list subscription, visit
https://utils.its.caltech.edu/mailman/listinfo/jsbml-development

For a web interface to the jsbml-development mailing list, visit
http://sbml.org/Forums/

For questions or feedback about the jsbml-development list,
contact sbml-team@caltech.edu

      

SubjectPosterDate
Read Message   getters and Double or Integer objects  Andreas Dräger18 Dec '09 06:32
Read Message   Re: getters and Double or Integer objects rodrigue18 Dec '09 06:41
Previous Topic:public void setParentSBML(SBase parent)
Next Topic:Formula in MathContainers
Go to forum:
-=] Back to Top [=-

Powered by FUDforum. (Copyright Advanced Internet Designs Inc.)

Please use our issue tracking system for any questions or suggestions about this website.