Aniadido soporte cambio de nombre

This commit is contained in:
2019-11-21 23:47:41 +01:00
parent a379ac104e
commit c759f93fea
16 changed files with 267 additions and 67 deletions

View File

@@ -32,6 +32,10 @@ public class Gestion implements Serializable{
return this.nombre;
}
public void setNombre(String nombre) {
this.nombre = nombre;
}
/**
* Aniade una transaccion a la gestion
*
@@ -88,6 +92,15 @@ public class Gestion implements Serializable{
}
}
public void editarTransaccion(String nombreViejo, String nombreNuevo) {
for(Transaccion elemento:this.gestiones) {
if(elemento.getNombre().equals(nombreViejo)) {
elemento.setName(nombreNuevo);
return;
}
}
}
/**
* Devuelve verdadero si es un ingerso y falso si es un gasto
*