How to get a element from Middle of a method to an ArrayList
题
Here is the Method where i get the Multiple List From different URL and then sort different List into a single ArrayList. Arraylist from different calendar has different EMAIL and OWNER NAME. In this method i am returning only a single ArrayList. how to get the EMAIL and OWNNER NAME of Each ArrayList?.
public List<ArrayList> getEventsSort(Filter filter, String uri, Sardine sardine,
List<String> emailShare) throws IOException, ParserException {
List eventsToday = null;
List arrayList = new ArrayList<String>();
for (String email : emailShare) {
String uris = uri + email + "/events/";
InputStream stream = null;
try {
stream = sardine.get(uris);
BufferedReader br = new BufferedReader(new InputStreamReader(
stream));
CalendarBuilder builder = new CalendarBuilder();
net.fortuna.ical4j.model.Calendar calendar = builder.build(br);
eventsToday = (List<?>) filter.filter(calendar
.getComponents(Component.VEVENT));
arrayList.addAll(eventsToday);
} finally {
IOUtils.closeQuietly(stream);
}
}
getSortList(arrayList);
return arrayList;
}
解决方案
you can do this by creating an array list of class objects that store 3 variables (email, source name and source email ID)
不隶属于 StackOverflow