Class SettingsMap

  • All Implemented Interfaces:
    com.strategyquant.lib.settings.IXMLAble, java.io.Serializable

    public class SettingsMap
    extends ValuesMap
    The Class SettingsMap.
    See Also:
    Serialized Form
    • Constructor Detail

      • SettingsMap

        public SettingsMap()
    • Method Detail

      • setIfNotExists

        public void setIfNotExists​(java.lang.String key,
                                   java.lang.Object value)
        Sets the if not exists.
        Parameters:
        key - the key
        value - the value
      • getXML

        public org.jdom2.Element getXML()
        Gets the xml.
        Specified by:
        getXML in interface com.strategyquant.lib.settings.IXMLAble
        Overrides:
        getXML in class ValuesMap
        Returns:
        the xml
      • getDouble

        public static double getDouble​(java.lang.Object obj,
                                       double defaultValue)
        Gets the double.
        Parameters:
        obj - the obj
        defaultValue - the default value
        Returns:
        the double
      • getInt

        public static int getInt​(java.lang.Object obj,
                                 int defaultValue)
        Gets the int.
        Parameters:
        obj - the obj
        defaultValue - the default value
        Returns:
        the int
      • getBool

        public static boolean getBool​(java.lang.Object obj,
                                      boolean defaultValue)
        Gets the bool.
        Parameters:
        obj - the obj
        defaultValue - the default value
        Returns:
        the bool
      • getLong

        public static long getLong​(java.lang.Object obj,
                                   long defaultValue)
        Gets the long.
        Parameters:
        obj - the obj
        defaultValue - the default value
        Returns:
        the long