forked from fga-eps-mds/2016.1-Emergo
-
Notifications
You must be signed in to change notification settings - Fork 0
StyleSheet
Geison de Souza Oliveira edited this page Oct 20, 2016
·
20 revisions
- IF / ELSE
When an else statement is a empty block, leave a comment. Example:
if (medicalRecord != null) {
medicalRecord.setClass(ConfigController.this, MedicalRecordsController.class);
startActivity(medicalRecord);
finish();
} else {
// Nothing to do
}
- NEW BLOCK
Each time a new block or block-like construct is opened, one line is left in blank before the code block. Example:
public void setLatitude(Double latitude) {
this.latitude = latitude;
}
public Double getLongitude() {
return longitude;
}
All variables in a single block.
double smaller = 99999;
int position = 0;
for (int aux = 0 ; aux < closestHealthUnit.size() ; aux++) {
if (closestHealthUnit.get(aux).getDistance() < smaller) {
smaller = closestHealthUnit.get(aux).getDistance();
position = aux;
} else {
/** nothing to do*/
}
}
- Home
- Style Sheet
- [List of good programming techniques] (https://github.com/Geisonszo/TecProg-Emergo/wiki/List-of-good-Programming-Techniques)
- List of classes, methods and attibutes
- Code analysis tools