package net.psammead.commonist.data;

import java.util.*;

/** Data edited in an ImageListUI */
public class ImageListData {
	private List<ImageData>	imageDatas;
	
	public ImageListData(List<ImageData> imageDatas) {
		this.imageDatas	= imageDatas;
	}
	
	public List<ImageData> getSelected() {
		List<ImageData>	out	= new ArrayList<ImageData>();
		for (Iterator<ImageData> it=imageDatas.iterator(); it.hasNext();) {
			ImageData	data	= it.next();
			if (data.upload)	out.add(data);
		}
		return Collections.unmodifiableList(out);
	}
}
