diff --git a/src/main/java/org/cryptomator/common/EventMap.java b/src/main/java/org/cryptomator/common/EventMap.java index f34f592a5..22f07bde7 100644 --- a/src/main/java/org/cryptomator/common/EventMap.java +++ b/src/main/java/org/cryptomator/common/EventMap.java @@ -18,16 +18,23 @@ import javafx.collections.MapChangeListener; import javafx.collections.ObservableMap; import java.nio.file.Path; import java.util.Collection; +import java.util.Comparator; import java.util.Map; import java.util.Set; /** * Map containing {@link VaultEvent}s. * The map is keyed by the ciphertext path of the affected resource _and_ the {@link FilesystemEvent}s class in order to group same events + *
+ * Use {@link EventMap#put(VaultEvent)} to add an element and {@link EventMap#remove(VaultEvent)} to remove it. + *
+ * The map is size restricted to {@value MAX_SIZE} elements. If a _new_ element (i.e. not already present) is added, the least recently added is removed.
*/
@Singleton
public class EventMap implements ObservableMap