ArrayList <>最後の値を複製しています、、、
ArrayList<CalanderQueryOutput> results = new ArrayList<CalanderQueryOutput>();
List<?> eventsToday = (List<?>) filter.filter(calendar.getComponents(Component.VEVENT));
CalanderQueryOutput caldavOutput = new CalanderQueryOutput();
for (Iterator<?> i = eventsToday.iterator(); i.hasNext();) {
Component component = (Component) i.next();
{
String Created=component.getProperty(Property.CREATED).toString().trim();
String Summary = component.getProperty(Property.SUMMARY).toString().trim();
caldavOutput.CREATED_DATE = Created;
caldavOutput.Summary = Summary;
}
results.add(caldavOutput);
}
出力には最後の値のみが表示されます
{"CREATED_DATE":"01-Jun-2012","Summary":"Today Swimming"},{"CREATED_DATE":"01-Jun-2012","Summary":"Today Swimming"},{"CREATED_DATE":"01-Jun-2012","Summary":"Today Swimming"}