maybe I have a strange question today. I already “solved” this at the moment by using two lists, but I want the infos in only one list, because i think it is easier to maintain and cleaner.
Lets assume that we have an object called
public class PersonsInfo{
int Age;
String Name;
Booelan Female;
}
a list holding all the peoples info
List<PersonsInfo> coolPeople = new ArrayList<PersonsInfo>()
and two Views, a GridView and a ListView
Now I want to show the girls in the GridView and the guys in the ListView.
Is this possible and what do i have to do, that this works? I don’t get it anymore 🙁
Or is my solution with two lists the only one?
Greetings!
There isn’t a LINQ equivalent in java, but you will need to look at Quaere here
This will allow you to filter girls / boys based on the
booleanproperty you have in your class.