如何从相同的方法返回2个数组列表
我有一个如下方法,此方法包含两个数组列表(“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;
}
如何获取列表“事件列表”和“电子邮件列表”