Package org.h2.engine

Class SettingsBase

  • Direct Known Subclasses:
    DbSettings

    public class SettingsBase
    extends java.lang.Object
    The base class for settings.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private java.util.HashMap<java.lang.String,​java.lang.String> settings  
    • Constructor Summary

      Constructors 
      Modifier Constructor Description
      protected SettingsBase​(java.util.HashMap<java.lang.String,​java.lang.String> s)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      protected boolean containsKey​(java.lang.String k)
      Check if the settings contains the given key.
      protected boolean get​(java.lang.String key, boolean defaultValue)
      Get the setting for the given key.
      protected int get​(java.lang.String key, int defaultValue)
      Get the setting for the given key.
      protected java.lang.String get​(java.lang.String key, java.lang.String defaultValue)
      Get the setting for the given key.
      java.util.HashMap<java.lang.String,​java.lang.String> getSettings()
      Get all settings.
      java.util.Map.Entry<java.lang.String,​java.lang.String>[] getSortedSettings()
      Get all settings in alphabetical order.
      (package private) void set​(java.lang.String key, boolean value)
      Set an entry in the key-value pair.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • settings

        private final java.util.HashMap<java.lang.String,​java.lang.String> settings
    • Constructor Detail

      • SettingsBase

        protected SettingsBase​(java.util.HashMap<java.lang.String,​java.lang.String> s)
    • Method Detail

      • get

        protected boolean get​(java.lang.String key,
                              boolean defaultValue)
        Get the setting for the given key.
        Parameters:
        key - the key
        defaultValue - the default value
        Returns:
        the setting
      • set

        void set​(java.lang.String key,
                 boolean value)
        Set an entry in the key-value pair.
        Parameters:
        key - the key
        value - the value
      • get

        protected int get​(java.lang.String key,
                          int defaultValue)
        Get the setting for the given key.
        Parameters:
        key - the key
        defaultValue - the default value
        Returns:
        the setting
      • get

        protected java.lang.String get​(java.lang.String key,
                                       java.lang.String defaultValue)
        Get the setting for the given key.
        Parameters:
        key - the key
        defaultValue - the default value
        Returns:
        the setting
      • containsKey

        protected boolean containsKey​(java.lang.String k)
        Check if the settings contains the given key.
        Parameters:
        k - the key
        Returns:
        true if they do
      • getSettings

        public java.util.HashMap<java.lang.String,​java.lang.String> getSettings()
        Get all settings.
        Returns:
        the settings
      • getSortedSettings

        public java.util.Map.Entry<java.lang.String,​java.lang.String>[] getSortedSettings()
        Get all settings in alphabetical order.
        Returns:
        the settings