Bueno ya puestos en materia he decidido usar el hasmap y softreference , antes yo para crear objeto usaba un setter ,getter llamado "Recipes" el cual era asi:
Código:
public class Recipes {
private int ID;
private String nombre;
private String tag;
private String date;
private String Ingredientes;
private String como;
private String rutaimg;
public void Setid(int id){
this.ID=id;
}
public int getId(){
return this.ID;
}
public void Setnombre(String nombre){
this.nombre=nombre;
}
public String getnombre(){
return this.nombre;
}
public void Settag(String tag){
this.tag=tag;
}
public String gettag(){
return this.tag;
}
public void Setdate(String date){
this.date=date;
}
public String getdate(){
return this.date;
}
public void SetIngredientes(String Ingredientes){
this.Ingredientes=Ingredientes;
}
public String getIngredientes(){
return this.Ingredientes;
}
public void Setcomo(String como){
this.como=como;
}
public String getcomo(){
return this.como;
}
public void Setrutaimg(String rutaimg){
this.rutaimg=rutaimg;
}
public String getrutaimg(){
return this.rutaimg;
}
}
Por lo que he leido esto los debería sustituir por un hashmap , mi primera duda es si el hashmap admite solo String,String o también otro tipo de valores como int ?
Y por otro lado no entiendo como hacer para que sea softreference , no lo acabo de entender ;)