When there is an List, is there a possibility of getting List of all person.getName() out of that?
Is there an prepared call for that
I think you will always need to do that. But if you will always need such things, then I would suggest to make another class, for example call it People where personList is a variable.
Something like this:
class People{
List personList;
//Getters and Setters
//Special getters
public List getPeopleNames(){
//implement your method here
}
public List getPeopleAges(){
//get all people ages here
}
}
In this case you will need to call one getter only each time.