Monday, 15 July 2013

java - Should I document overriden hashCode() and toString()? -



java - Should I document overriden hashCode() and toString()? -

is desirable document overriden hashcode() , tostring() or similar methods in java? (not including equals() , similar of course) conventions?

from oracle's javadoc guide:

so if documentation of overridden or implemented method sufficient, not need add together documentation m().

if hashcode or tostring doing different documentation in object need amend code rather documentation. using these methods without access javadoc expect them behave documented in object.

javadoc:

hashcode tostring

java

No comments:

Post a Comment