我有一个方法如下,这个方法包含两个arraylist(“eventList”和“emailList”)。
List<EmailUID> emailid=SharedEvent.getEmailUid(filter, uri, exchWD, EmailShare);
public static List<EmailUID> getEmailUid(Filter filter, String uri, NexWebDav exchWD,
List<String> emailShare)
List eventsToday = null;
List<EmailUID> arrayList = new ArrayList<EmailUID>();
List<EmailUID> emailList = new ArrayList<EmailUID>();
List<EmailUID> eventList = new ArrayList<EmailUID>();
for (String email : emailShare) {
String uris = uri + email + "/events/";
InputStream stream = null;
try {
stream = exchWD.get(uris);
BufferedReader br = new BufferedReader(new InputStreamReader(stream));
CalendarBuilder builder = new CalendarBuilder();
net.fortuna.ical4j.model.Calendar calendar = builder.build(br);
//eventsToday.add(email);
eventsToday = (List<?>) filter.filter(calendar.getComponents(Component.VEVENT));
arrayList=getEmailUID(eventsToday,email);
emailList.addAll(arrayList);//
eventList.addAll(eventsToday);//
} catch (ParserException e) {
LOGGER.error("Parse Exception"+e.getMessage());
} finally {
IOUtils.closeQuietly(stream);
}
}
//return eventList;
return emailList;
}
如何同时获取列表“eventList”和“emailList”