Skip to content
Snippets Groups Projects
Commit df65763a authored by Tobias Iroa Otero's avatar Tobias Iroa Otero
Browse files

act

parent 866981b4
No related branches found
No related tags found
No related merge requests found
package Manejadores;
import java.util.Date;
import java.util.HashMap;
import java.util.Iterator;
import java.util.Map.Entry;
import java.util.Set;
import logica.Actividad;
......@@ -27,8 +28,12 @@ public class ManejadorActividad {
//Operaciones
public Set<DataActividad> getDAct() {
Set<DataActividad> resultado;
Set<DataActividad> resultado = null;
Set<Entry<String, Actividad>> aux = colAct.entrySet();
Iterator<Entry<String, Actividad>> it = aux.iterator();
while(it.hasNext()){
resultado.add(it.next().getValue().getDataAT());
}
return resultado;
}
}
\ No newline at end of file
......@@ -41,4 +41,7 @@ public class Actividad {
return this.duracion;
}
public DataActividad getDataAT() {
return new DataActividad(this.nombre,this.descripcion,this.fechaAlta,this.ciudad,this.costo,this.duracion);
}
}
package logica;
import java.util.Date;
public class DataActividad {
public DataActividad() {}
public DataActividad() {
}
public DataActividad(String n, String d, Date f, String c, int cos, int dur) {
this.nombre = n;
this.descripcion = d;
this.fechaAlta = f;
this.ciudad = c;
this.costo = cos;
this.duracion = dur;
}
private String nombre;
private String descripcion;
private Date fechaAlta;
private String ciudad;
private int costo;
private int duracion;
//Getters y Setters
public String getNombre() {
return this.nombre;
}
public String getDescripcion() {
return this.descripcion;
}
public Date getFechaAlta() {
return this.fechaAlta;
}
public String getCiudad() {
return this.ciudad;
}
public int getCosto() {
return this.costo;
}
public int getDuracion() {
return this.duracion;
}
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment