SimpleProps (SelekTOR Java Documentation)
Date: 2017-04-14

lib

## Class SimpleProps

- java.lang.Object
- - lib.SimpleProps

-     public final class SimpleProps
      extends java.lang.Object

  Author:
    Alistair Neil

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `SimpleProps(java.lang.String filepath, java.lang.String comment)` Constructor, requires

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `boolean` | `delete()` Delete the properties file store
    `boolean` | `getBool(java.lang.String property)` Get a boolean property
    `java.lang.String` | `getChangedProperties()` Get a comma separated list of properties that were changed
    `int` | `getInt(java.lang.String property)` Get an integer number property
    `long` | `getLong(java.lang.String property)` Get a long number property
    `java.lang.String` | `getString(java.lang.String key)` Get a String property
    `void` | `load()` Load from xml file
    `void` | `resetToDefaults()` Reset to defaults
    `void` | `save()` Save to xml file
    `void` | `setBool(java.lang.String property, boolean enabled)` Set a boolean property
    `void` | `setDefaultModeEnabled(boolean enabled)` Enable/disable default mode
    `void` | `setInt(java.lang.String property, int num)` Set a integer number property
    `void` | `setLong(java.lang.String property, long num)` Set a long number property
    `java.lang.Object` | `setString(java.lang.String key, java.lang.String value)` Set a String property

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### SimpleProps

          public SimpleProps(java.lang.String filepath,
                             java.lang.String comment)

      Constructor, requires
      Parameters:
        `filepath` -
        `comment` -

  - ### Method Detail

    - #### setDefaultModeEnabled

          public void setDefaultModeEnabled(boolean enabled)

      Enable/disable default mode
      Parameters:
        `enabled` -

    - #### setLong

          public void setLong(java.lang.String property,
                              long num)

      Set a long number property
      Parameters:
        `property` -
        `num` -

    - #### getLong

          public long getLong(java.lang.String property)

      Get a long number property
      Parameters:
        `property` -
      Returns:
        A long number

    - #### setInt

          public void setInt(java.lang.String property,
                             int num)

      Set a integer number property
      Parameters:
        `property` -
        `num` -

    - #### getInt

          public int getInt(java.lang.String property)

      Get an integer number property
      Parameters:
        `property` -
      Returns:
        an integer

    - #### setBool

          public void setBool(java.lang.String property,
                              boolean enabled)

      Set a boolean property
      Parameters:
        `property` -
        `enabled` -

    - #### getBool

          public boolean getBool(java.lang.String property)

      Get a boolean property
      Parameters:
        `property` -
      Returns:
        boolean

    - #### setString

          public java.lang.Object setString(java.lang.String key,
                                            java.lang.String value)

      Set a String property
      Parameters:
        `key` -
        `value` -
      Returns:
        String

    - #### getString

          public java.lang.String getString(java.lang.String key)

      Get a String property
      Parameters:
        `key` -
      Returns:
        String or null

    - #### save

          public void save()

      Save to xml file

    - #### load

          public void load()

      Load from xml file

    - #### delete

          public boolean delete()

      Delete the properties file store
      Returns:
        true if successful

    - #### getChangedProperties

          public java.lang.String getChangedProperties()

      Get a comma separated list of properties that were changed
      Returns:
        A String of property keys that were changed

    - #### resetToDefaults

          public void resetToDefaults()

      Reset to defaults