ur_rna.Utilities.prefs

## Class FilePreferences

- java.lang.Object
- - java.util.prefs.Preferences
  - - java.util.prefs.AbstractPreferences
    - - ur_rna.Utilities.prefs.FilePreferences

- Direct Known Subclasses:
    FilePreferences.RootNode

      public class FilePreferences
      extends java.util.prefs.AbstractPreferences

  Preferences implementation that stores to a user-defined file.

- - ### Nested Class Summary

    Nested Classes
    Modifier and Type | Class and Description
    --- | ---
    `static class` | `FilePreferences.Factory` PreferencesFactory implementation that stores the preferences in an XML file.
    `protected static class` | `FilePreferences.RootNode`

  - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `private java.util.Set<java.lang.String>` | `childNames`
    `private static java.lang.String[]` | `EMPTY_NAME_ARRAY`
    `private static java.util.logging.Logger` | `log`
    `private boolean` | `modified`
    `private java.util.Map<java.lang.String,java.lang.String>` | `prefs`
    `protected FilePreferences.RootNode` | `root`

    - ### Fields inherited from class java.util.prefs.AbstractPreferences

      `lock, newNode`

    - ### Fields inherited from class java.util.prefs.Preferences

      `MAX_KEY_LENGTH, MAX_NAME_LENGTH, MAX_VALUE_LENGTH`

  - ### Constructor Summary

    Constructors
    Modifier | Constructor and Description
    --- | ---
    `protected` | `FilePreferences(java.util.prefs.AbstractPreferences parent, java.lang.String name)`

  - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `protected java.lang.String[]` | `childrenNamesSpi()`
    `protected FilePreferences` | `childSpi(java.lang.String name)`
    `static FilePreferences` | `createRoot()`
    `static FilePreferences` | `createRoot(java.lang.String preferencesFilePath)`
    `void` | `flush()`
    `protected void` | `flushSpi()`
    `java.io.File` | `getPreferencesFile()`
    `FilePreferences` | `getRoot()`
    `protected java.lang.String` | `getSpi(java.lang.String key)`
    `boolean` | `isModified()`
    `protected java.lang.String[]` | `keysSpi()`
    `java.lang.String` | `nodePrefix()` Returns the absolute path and ensures that it ends with a slash (/) For child nodes this is the same as `absolutePath() + '/'` but for the root node it is just '/'.
    `protected void` | `putSpi(java.lang.String key, java.lang.String value)`
    `protected void` | `readProps()`
    `protected void` | `removeNodeSpi()`
    `protected void` | `removeSpi(java.lang.String key)`
    `protected FilePreferences.RootNode` | `rootNode()`
    `void` | `setPreferencesFile(java.io.File file)`
    `void` | `sync()`
    `protected void` | `syncSpi()`

    - ### Methods inherited from class java.util.prefs.AbstractPreferences

      `absolutePath, addNodeChangeListener, addPreferenceChangeListener, cachedChildren, childrenNames, clear, exportNode, exportSubtree, get, getBoolean, getByteArray, getChild, getDouble, getFloat, getInt, getLong, isRemoved, isUserNode, keys, name, node, nodeExists, parent, put, putBoolean, putByteArray, putDouble, putFloat, putInt, putLong, remove, removeNode, removeNodeChangeListener, removePreferenceChangeListener, toString`

    - ### Methods inherited from class java.util.prefs.Preferences

      `importPreferences, systemNodeForPackage, systemRoot, userNodeForPackage, userRoot`

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

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

- - ### Field Detail

    - #### childNames

          private java.util.Set<java.lang.String> childNames

    - #### EMPTY_NAME_ARRAY

          private static final java.lang.String[] EMPTY_NAME_ARRAY

    - #### log

          private static final java.util.logging.Logger log

    - #### modified

          private boolean modified

    - #### prefs

          private java.util.Map<java.lang.String,java.lang.String> prefs

    - #### root

          protected final FilePreferences.RootNode root

  - ### Constructor Detail

    - #### FilePreferences

          protected FilePreferences(java.util.prefs.AbstractPreferences parent,
                                    java.lang.String name)

  - ### Method Detail

    - #### childrenNamesSpi

          protected java.lang.String[] childrenNamesSpi()
                                                 throws java.util.prefs.BackingStoreException

      Specified by:
        `childrenNamesSpi` in class `java.util.prefs.AbstractPreferences`
      Throws:
        `java.util.prefs.BackingStoreException`

    - #### childSpi

          protected FilePreferences childSpi(java.lang.String name)

      Specified by:
        `childSpi` in class `java.util.prefs.AbstractPreferences`

    - #### createRoot

          public static FilePreferences createRoot()

    - #### createRoot

          public static FilePreferences createRoot(java.lang.String preferencesFilePath)

    - #### flush

          public void flush()
                     throws java.util.prefs.BackingStoreException

      Overrides:
        `flush` in class `java.util.prefs.AbstractPreferences`
      Throws:
        `java.util.prefs.BackingStoreException`

    - #### flushSpi

          protected void flushSpi()
                           throws java.util.prefs.BackingStoreException

      Specified by:
        `flushSpi` in class `java.util.prefs.AbstractPreferences`
      Throws:
        `java.util.prefs.BackingStoreException`

    - #### getPreferencesFile

          public java.io.File getPreferencesFile()

    - #### getRoot

          public FilePreferences getRoot()

    - #### getSpi

          protected java.lang.String getSpi(java.lang.String key)

      Specified by:
        `getSpi` in class `java.util.prefs.AbstractPreferences`

    - #### isModified

          public boolean isModified()

    - #### keysSpi

          protected java.lang.String[] keysSpi()
                                        throws java.util.prefs.BackingStoreException

      Specified by:
        `keysSpi` in class `java.util.prefs.AbstractPreferences`
      Throws:
        `java.util.prefs.BackingStoreException`

    - #### nodePrefix

          public java.lang.String nodePrefix()

      Returns the absolute path and ensures that it ends with a slash (/) For child nodes this is the same as `absolutePath() + '/'` but for the root node it is just '/'.

    - #### putSpi

          protected void putSpi(java.lang.String key,
                                java.lang.String value)

      Specified by:
        `putSpi` in class `java.util.prefs.AbstractPreferences`

    - #### readProps

          protected void readProps()

    - #### removeNodeSpi

          protected void removeNodeSpi()
                                throws java.util.prefs.BackingStoreException

      Specified by:
        `removeNodeSpi` in class `java.util.prefs.AbstractPreferences`
      Throws:
        `java.util.prefs.BackingStoreException`

    - #### removeSpi

          protected void removeSpi(java.lang.String key)

      Specified by:
        `removeSpi` in class `java.util.prefs.AbstractPreferences`

    - #### rootNode

          protected FilePreferences.RootNode rootNode()

    - #### setPreferencesFile

          public void setPreferencesFile(java.io.File file)

    - #### sync

          public void sync()
                    throws java.util.prefs.BackingStoreException

      Overrides:
        `sync` in class `java.util.prefs.AbstractPreferences`
      Throws:
        `java.util.prefs.BackingStoreException`

    - #### syncSpi

          protected void syncSpi()
                          throws java.util.prefs.BackingStoreException

      Specified by:
        `syncSpi` in class `java.util.prefs.AbstractPreferences`
      Throws:
        `java.util.prefs.BackingStoreException`