Aniadido soporte cambio de nombre
This commit is contained in:
@@ -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
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user