package com.epson.memcardacc;

import java.io.Serializable;
import java.util.ArrayList;
import java.util.Collection;
import java.util.HashMap;
import java.util.LinkedList;
import java.util.Map;

class ReaderSelectedImage implements Serializable {
    private static final long serialVersionUID = 1;
    private Map<String, Collection<CifsFileInfo>> mDataMap = new HashMap();

    ReaderSelectedImage() {
    }

    public ArrayList<String> getAllFileFullPath() {
        ArrayList<String> arrayList = new ArrayList<>();
        for (String next : mDataMap.keySet()) {
            for (CifsFileInfo cifsFileInfo : mDataMap.get(next)) {
                arrayList.add(CifsAccess.join(next, cifsFileInfo.mFileName));
            }
        }
        return arrayList;
    }

    public boolean contains(String str, CifsFileInfo cifsFileInfo) {
        Collection collection = mDataMap.get(str);
        if (collection == null) {
            return false;
        }
        return collection.contains(cifsFileInfo);
    }

    public void deleteBaseDir(String str) {
        mDataMap.remove(str);
    }

    public int getFileSize() {
        int i = 0;
        for (String str : mDataMap.keySet()) {
            i += mDataMap.get(str).size();
        }
        return i;
    }

    public void setFileList(String str, LinkedList<CifsFileInfo> linkedList) {
        if (!linkedList.isEmpty()) {
            mDataMap.put(str, linkedList);
        }
    }
}
