package seedu.address.commons.core;

import java.util.Objects;
import java.util.logging.Level;

/**
 * Config values used by the app
 */
public class Config {

    public static final String DEFAULT_CONFIG_FILE = "config.json";

    // Config values customizable through config file
    private String appTitle = "Doit";
    private Level logLevel = Level.INFO;
    private String userPrefsFilePath = "preferences.json";
    private String addressBookFilePath = "data/addressbook.xml";
    private String addressBookName = "MyAddressBook";


    public String getAppTitle() {
        return appTitle;
    }

    public void setAppTitle(String appTitle) {
        this.appTitle = appTitle;
    }

    public Level getLogLevel() {
        return logLevel;
    }

    public void setLogLevel(Level logLevel) {
        this.logLevel = logLevel;
    }

    public String getUserPrefsFilePath() {
        return userPrefsFilePath;
    }

    public void setUserPrefsFilePath(String userPrefsFilePath) {
        this.userPrefsFilePath = userPrefsFilePath;
    }

    public String getAddressBookFilePath() {
        return addressBookFilePath;
    }

    public void setAddressBookFilePath(String addressBookFilePath) {
        this.addressBookFilePath = addressBookFilePath;
    }

    public String getAddressBookName() {
        return addressBookName;
    }

    public void setAddressBookName(String addressBookName) {
        this.addressBookName = addressBookName;
    }


    @Override
    public boolean equals(Object other) {
        if (other == this) {
            return true;
        }
        if (!(other instanceof Config)) { //this handles null as well.
            return false;
        }

        Config o = (Config) other;

        return Objects.equals(appTitle, o.appTitle)
                && Objects.equals(logLevel, o.logLevel)
                && Objects.equals(userPrefsFilePath, o.userPrefsFilePath)
                && Objects.equals(addressBookFilePath, o.addressBookFilePath)
                && Objects.equals(addressBookName, o.addressBookName);
    }

    @Override
    public int hashCode() {
        return Objects.hash(appTitle, logLevel, userPrefsFilePath, addressBookFilePath, addressBookName);
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append("App title : " + appTitle);
        sb.append("\nCurrent log level : " + logLevel);
        sb.append("\nPreference file Location : " + userPrefsFilePath);
        sb.append("\nLocal data file location : " + addressBookFilePath);
        sb.append("\nTaskManager name : " + addressBookName);
        return sb.toString();
    }

}

@@ -429,35 +429,35 @@
 vate String 
-addressBook
+taskManager
 FilePath = %22
@@ -502,40 +502,40 @@
 ing 
-addressBookName = %22MyAddressBook
+taskManagerName = %22MyTaskManager
 %22;%0A%0A
@@ -1109,27 +1109,27 @@
  return 
-addressBook
+taskManager
 FilePath
@@ -1219,27 +1219,27 @@
    this.
-addressBook
+taskManager
 FilePath
@@ -1325,27 +1325,27 @@
  return 
-addressBook
+taskManager
 Name;%0A  
@@ -1423,27 +1423,27 @@
    this.
-addressBook
+taskManager
 Name = a
@@ -1946,27 +1946,27 @@
 .equals(
-addressBook
+taskManager
 FilePath
@@ -1969,27 +1969,27 @@
 Path, o.
-addressBook
+taskManager
 FilePath
@@ -2028,38 +2028,38 @@
 als(
-addressBookName, o.addressBook
+taskManagerName, o.taskManager
 Name
@@ -2181,40 +2181,40 @@
 th, 
-addressBookFilePath, addressBook
+taskManagerFilePath, taskManager
 Name
@@ -2542,27 +2542,27 @@
 n : %22 + 
-addressBook
+taskManager
 FilePath
@@ -2608,27 +2608,27 @@
 e : %22 + 
-addressBook
+taskManager
 Name);%0A 

Refactor Config class parameters from addressbook to task manager taskManagerFilePath = "data/addressbook.xml" still the same