I have my class ItemList
public class ItemListPropaganda {
private int iconeRid;
private String texto;
private int valor;
public ItemListPropaganda(String texto, int iconeRid, int valor) {
this.texto = texto;
this.iconeRid = iconeRid;
this.valor = valor;
}
public int getIconeRid() {
return iconeRid;
}
public void setIconeRid(int iconeRid) {
this.iconeRid = iconeRid;
}
public String getTexto() {
return texto;
}
public void setTexto(String texto) {
this.texto = texto;
}
public int getvalor() {
return valor;
}
public void setvalor(int valor) {
this.valor = valor;
}
}
I have in my main class:
private ArrayList<ItemListPropaganda > itens;
How can I do to sort by value?