package net.pterodactylus.jsite.project;
import java.beans.PropertyChangeListener;
-import java.util.ArrayList;
-import java.util.List;
+import java.util.HashMap;
+import java.util.Map;
import net.pterodactylus.util.beans.AbstractBean;
private String basePath;
/** The overrides. */
- private final List<Override> overrides = new ArrayList<Override>();
+ private final Map<String, Override> overrides = new HashMap<String, Override>();
/**
* Creates a new project.
}
/**
+ * Adds an override for the given file.
+ *
+ * @param filePath
+ * The file path
+ * @param override
+ * The override for the file
+ */
+ public void addOverride(String filePath, Override override) {
+ overrides.put(filePath, override);
+ }
+
+ /**
+ * Removes the override for the given file.
+ *
+ * @param filePath
+ * The file path for which to remove the override
+ */
+ public void removeOverride(String filePath) {
+ overrides.remove(filePath);
+ }
+
+ /**
* Returns the list of {@link Override}s.
*
* @return All overrides
*/
- public List<Override> getOverrides() {
+ public Map<String, Override> getOverrides() {
return overrides;
}