Filter objects in my arraylist in android

teon

New Member
I am using a XML parser and as result I get a \[code\]ArrayList\[/code\] with my objects:\[code\]ArrayList <Datapoint> itemsList = parseXML();\[/code\]One Datapoint object consists of the following Strings:\[code\]name: astateBased: bmainNumber: cdptID: dgroupadress: epriority: f\[/code\]I was already able to display all the objects with this code:\[code\]for(int i=0;i<itemsList.size();i++){ item = itemsList.get(i); parsedData = http://stackoverflow.com/questions/12462463/parsedData +"----->\n"; String name = parsedData + "Name: " + item.getName() + "\n"; String stateBased = parsedData + "stateBased: " + item.getStateBased() + "\n"; String mainNumber = parsedData + "mainNumber: " + item.getMainNumber() + "\n"; String dptID = parsedData + "dptID: "+ item.getDptID() + "\n"; String groupadress = parsedData + "Groupadress: "+ item.getGroupadress() + "\n"; String priority = parsedData + "priority: "+ item.getPriority() + "\n";}\[/code\]But how can I filter one object out of the ArrayList? I want to use each object with its strings seperately in another activity.It would be great to have for example 5 string arrays each as a object from my ArrayList including the strings shown above.How can I realize this or what would be an alternative?Thanks!
 
Back
Top