Refactorizando visibilidad transacciones
This commit is contained in:
@@ -30,16 +30,13 @@ public class Gestion{
|
||||
return this.gestiones;
|
||||
}
|
||||
|
||||
public void alterarVisibilidad(boolean visibilidad, int elemento) {
|
||||
if(this.gestiones.get(elemento).alterarVisivilidad(visibilidad)) {
|
||||
if(this.gestiones.get(elemento).getVisivilidad()) {
|
||||
this.suma+=this.gestiones.get(elemento).getDinero();
|
||||
Gestion.total+=this.gestiones.get(elemento).getDinero();
|
||||
}else {
|
||||
this.suma-=this.gestiones.get(elemento).getDinero();
|
||||
Gestion.total-=this.gestiones.get(elemento).getDinero();
|
||||
}
|
||||
|
||||
public void alterarVisibilidad(int elemento) {
|
||||
if(this.gestiones.get(elemento).alterarVisivilidad()) {
|
||||
this.suma+=this.gestiones.get(elemento).getDinero();
|
||||
Gestion.total+=this.gestiones.get(elemento).getDinero();
|
||||
}else {
|
||||
this.suma-=this.gestiones.get(elemento).getDinero();
|
||||
Gestion.total-=this.gestiones.get(elemento).getDinero();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user