Système de synchronisation de l'information entre FileFrontEnd<>StorBackEnd -> implémentation de File
This commit is contained in:
parent
49fe7fb7e7
commit
b2d34dbaf4
44
app/src/main/java/lightcontainer/storage/File.java
Normal file
44
app/src/main/java/lightcontainer/storage/File.java
Normal file
@ -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<String> storage;
|
||||
|
||||
public File(String name, int size, String iv, Set<String> 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<String> getStorageIterator() {
|
||||
return storage.iterator();
|
||||
}
|
||||
|
||||
public boolean addStorage(String storage) {
|
||||
if (this.storage.contains(storage)) {
|
||||
return false;
|
||||
} else {
|
||||
this.storage.add(storage);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user