package net.sf.jabref.model.metadata;

import java.util.Collections;
import java.util.HashMap;
import java.util.List;
import java.util.Objects;

public class ContentSelectors {

    private HashMap<String, List<String>> contentSelectors;

    public ContentSelectors() {
        contentSelectors = new HashMap<>();
    }

    public void addContentSelector(String fieldName, List<String> selectors) {
        Objects.requireNonNull(fieldName);
        Objects.requireNonNull(selectors);

        this.contentSelectors.put(fieldName, selectors);
    }

    public List<String> getSelectorsForField(String fieldName) {
        List<String> result = contentSelectors.get(fieldName);

        if(result == null){
            result = Collections.emptyList();
        }

        return result;
    }

    public void removeSelector(String fieldName) {
        contentSelectors.remove(fieldName);
    }

    public static ContentSelectors parse(List<String> selectors) {
        //fixme: do the actual parsing

        return null;
    }

    public List<String> getAsStringList() {
        // fixme: do the actual serialization

        return null;
    }

    public HashMap<String, List<String>> getSelectorData() {
        return contentSelectors;
    }
}

@@ -111,16 +111,38 @@
 l.List;%0A
+import java.util.Map;%0A
 import j
@@ -159,16 +159,16 @@
 bjects;%0A
-
 %0Apublic 
@@ -205,20 +205,22 @@
 private 
-Hash
+final 
 Map%3CStri
@@ -256,16 +256,17 @@
 ctors;%0A%0A
+%0A
     publ
@@ -709,16 +709,17 @@
       if
+ 
 (result 
@@ -726,16 +726,17 @@
 == null)
+ 
 %7B%0A      
@@ -1164,32 +1164,32 @@
 rn null;%0A    %7D%0A%0A
+
     public HashM
@@ -1183,20 +1183,16 @@
  public 
-Hash
 Map%3CStri

Fix codacy, use Interface instead of concrete type