http://www.basef.com.br/index.php?title=Method_Names&feed=atom&action=historyMethod Names - Histórico de revisão2024-03-29T07:36:24ZHistórico de revisões para esta página neste wikiMediaWiki 1.26alphahttp://www.basef.com.br/index.php?title=Method_Names&diff=2341&oldid=prevAdmin: Criou página com 'Methods should have verb or verb phrase names like postPayment, deletePage, or save. Accessors, mutators, and predicates should be named for their value and prefixed with get,...'2020-01-27T14:25:08Z<p>Criou página com 'Methods should have verb or verb phrase names like postPayment, deletePage, or save. Accessors, mutators, and predicates should be named for their value and prefixed with get,...'</p>
<p><b>Página nova</b></p><div>Methods should have verb or verb phrase names like postPayment, deletePage, or save.<br />
Accessors, mutators, and predicates should be named for their value and prefixed with get,<br />
set, and is according to the javabean standard.<br />
<br />
<source lang="Java"><br />
string name = employee.getName();<br />
customer.setName("mike");<br />
if (paycheck.isPosted())...<br />
</source><br />
<br />
When constructors are overloaded, use static factory methods with names that<br />
describe the arguments. For example,<br />
<br />
<source lang="Java"><br />
Complex fulcrumPoint = Complex.FromRealNumber(23.0);<br />
</source><br />
<br />
is generally better than<br />
<br />
<source lang="Java"><br />
Complex fulcrumPoint = new Complex(23.0);<br />
</source><br />
<br />
Consider enforcing their use by making the corresponding constructors private.<br />
<br />
[[Category: Clean Code]]</div>Admin