I have the next class
public class AllCategory {
int id;
String nombre;
int padre;
List<Clase> hijos;
}
I receive a list of the following object:
public class Category {
int id;
String nombre;
int padre;
List<Clase> hijos;
}
Each Category has an id, the name and the id of its parent category. I want to get an AllCategory list so that each node in the list is the father and the sub nodes are its children, I really do not know how to do it. I appreciate your help.