diff --git a/app/src/main/java/lightcontainer/storage/File.java b/app/src/main/java/lightcontainer/storage/File.java new file mode 100644 index 0000000..dcee5cc --- /dev/null +++ b/app/src/main/java/lightcontainer/storage/File.java @@ -0,0 +1,44 @@ +package lightcontainer.storage; + +import java.util.Iterator; +import java.util.Set; + +public class File { + + private final String name; + private final int size; + private final String iv; + private final Set storage; + + public File(String name, int size, String iv, Set storage) { + this.name = name; + this.size = size; + this.iv = iv; + this.storage = storage; + } + + public String getName() { + return name; + } + + public int getSize() { + return size; + } + + public String getIv() { + return iv; + } + + public Iterator getStorageIterator() { + return storage.iterator(); + } + + public boolean addStorage(String storage) { + if (this.storage.contains(storage)) { + return false; + } else { + this.storage.add(storage); + return true; + } + } +}