...
Wiki Markup |
---|
As a {{public}} data member, {{total}} can be altered by external code, independent of the {{add()}} and {{remove()}} methods. It is a bad practice to expose both mutable and immutable fields from a {{public}} class \[[Bloch 2008|AA. Bibliography#Bloch 08]\]. |
...
Depending on the required functionality, wrapper methods may retrieve either a reference to the Hashmap
HashMap
, a copy of the HashMap
, or a value contained by the Hashmap
HashMap
. This compliant solution adds a wrapper method to return the value of an element given its index in the Hashmap
HashMap
.
Exceptions
Wiki Markup |
---|
*OBJ01-EX0:* According to Sun's Code Conventions document \[[Conventions 2009|AA. Bibliography#Conventions 09]\]: |
...
Detection of public and protected data members is trivial; heuristic detection of the presence or absence of getter and setter wrapper methods is straightforward. However, simply reporting all detected cases without suppressing those cases covered by the exceptions to this rule would produce many excessive false positives and appears unlikely to be satisfactory. Sound detection and application of the exceptions to this rule appears to be infeasible; is infeasible, however, heuristic techniques may be useful.
...
<ac:structured-macro ac:name="unmigrated-wiki-markup" ac:schema-version="1" ac:macro-id="fc9853a3549ae22e-9e6c52c9-48a649dd-8f1d956f-32affa6f0e4c59c061e5ef34"><ac:plain-text-body><![CDATA[ | [[Bloch 2008 | AA. Bibliography#Bloch 08]] | Items 13: Minimize the accessibility of classes and members; 14: In public classes, use accessor methods, not public fields | ]]></ac:plain-text-body></ac:structured-macro> | |
<ac:structured-macro ac:name="unmigrated-wiki-markup" ac:schema-version="1" ac:macro-id="da27611ffbecc3e8-dae27d1c-4e6640a7-a85fb502-3a585e02e8942ea8aa3f3a32"><ac:plain-text-body><![CDATA[ | [[JLS 2005 | AA. Bibliography#JLS 05]] | [§6.6 "Access Control" | http://java.sun.com/docs/books/jls/third_edition/html/names.html#6.6] | ]]></ac:plain-text-body></ac:structured-macro> |
<ac:structured-macro ac:name="unmigrated-wiki-markup" ac:schema-version="1" ac:macro-id="9ba07927cc72d7ee-e1b781a5-4f6e4e14-95868754-690a6059f497accc03ad16da"><ac:plain-text-body><![CDATA[ | [[Long 2005 | AA. Bibliography#Long 05]] | §2.2, Public Fields | ]]></ac:plain-text-body></ac:structured-macro> |
...