Interface ITable

    • Method Detail

      • containsKey

        boolean containsKey​(String key)
        Deprecated.
        Checks the table and tells if it contains the specified key
        Parameters:
        key - the key to search for
        Returns:
        true if the table as a value assigned to the given key
      • containsSubTable

        boolean containsSubTable​(String key)
        Deprecated.
        Parameters:
        key - the key to search for
        Returns:
        true if there is a subtable with the key which contains at least one key/subtable of its own
      • getSubTable

        ITable getSubTable​(String key)
        Deprecated.
        Returns the table at the specified key. If there is no table at the specified key, it will create a new table
        Parameters:
        key - the name of the table relative to this one
        Returns:
        a sub table relative to this one
      • getKeys

        Set<String> getKeys​(int types)
        Deprecated.
        Gets all keys in the table (not including sub-tables).
        Parameters:
        types - bitmask of types; 0 is treated as a "don't care".
        Returns:
        keys currently in the table
      • getKeys

        Set<String> getKeys()
        Deprecated.
        Gets all keys in the table (not including sub-tables).
        Returns:
        keys currently in the table
      • getSubTables

        Set<String> getSubTables()
        Deprecated.
        Gets the names of all subtables in the table.
        Returns:
        subtables currently in the table
      • setPersistent

        void setPersistent​(String key)
        Deprecated.
        Makes a key's value persistent through program restarts. The key cannot be null.
        Parameters:
        key - the key name
      • clearPersistent

        void clearPersistent​(String key)
        Deprecated.
        Stop making a key's value persistent through program restarts. The key cannot be null.
        Parameters:
        key - the key name
      • isPersistent

        boolean isPersistent​(String key)
        Deprecated.
        Returns whether the value is persistent through program restarts. The key cannot be null.
        Parameters:
        key - the key name
        Returns:
        True if the value is persistent.
      • setFlags

        void setFlags​(String key,
                      int flags)
        Deprecated.
        Sets flags on the specified key in this table. The key can not be null.
        Parameters:
        key - the key name
        flags - the flags to set (bitmask)
      • clearFlags

        void clearFlags​(String key,
                        int flags)
        Deprecated.
        Clears flags on the specified key in this table. The key can not be null.
        Parameters:
        key - the key name
        flags - the flags to clear (bitmask)
      • getFlags

        int getFlags​(String key)
        Deprecated.
        Returns the flags for the specified key.
        Parameters:
        key - the key name
        Returns:
        the flags, or 0 if the key is not defined
      • delete

        void delete​(String key)
        Deprecated.
        Deletes the specified key in this table. The key can not be null.
        Parameters:
        key - the key name
      • getValue

        Object getValue​(String key,
                        Object defaultValue)
        Deprecated.
        Gets the value associated with a key as an object. NOTE: If the value is a double, it will return a Double object, not a primitive. To get the primitive, use getDouble(String, double).
        Parameters:
        key - the key of the value to look up
        defaultValue - the default value if the key is null
        Returns:
        the value associated with the given key
      • putValue

        boolean putValue​(String key,
                         Object value)
                  throws IllegalArgumentException
        Deprecated.
        Put a value in the table
        Parameters:
        key - the key to be assigned to
        value - the value that will be assigned
        Returns:
        False if the table key already exists with a different type
        Throws:
        IllegalArgumentException - when the value is not supported by the table
      • putNumber

        boolean putNumber​(String key,
                          double value)
        Deprecated.
        Put a number in the table
        Parameters:
        key - the key to be assigned to
        value - the value that will be assigned
        Returns:
        False if the table key already exists with a different type
      • setDefaultNumber

        boolean setDefaultNumber​(String key,
                                 double defaultValue)
        Deprecated.
        Gets the current value in the table, setting it if it does not exist.
        Parameters:
        key - the key
        defaultValue - the default value to set if key doens't exist.
        Returns:
        False if the table key exists with a different type
      • getNumber

        double getNumber​(String key,
                         double defaultValue)
        Deprecated.
        Returns the number the key maps to. If the key does not exist or is of different type, it will return the default value.
        Parameters:
        key - the key to look up
        defaultValue - the value to be returned if no value is found
        Returns:
        the value associated with the given key or the given default value if there is no value associated with the key
      • putString

        boolean putString​(String key,
                          String value)
        Deprecated.
        Put a string in the table
        Parameters:
        key - the key to be assigned to
        value - the value that will be assigned
        Returns:
        False if the table key already exists with a different type
      • setDefaultString

        boolean setDefaultString​(String key,
                                 String defaultValue)
        Deprecated.
        Gets the current value in the table, setting it if it does not exist.
        Parameters:
        key - the key
        defaultValue - the default value to set if key doens't exist.
        Returns:
        False if the table key exists with a different type
      • getString

        String getString​(String key,
                         String defaultValue)
        Deprecated.
        Returns the string the key maps to. If the key does not exist or is of different type, it will return the default value.
        Parameters:
        key - the key to look up
        defaultValue - the value to be returned if no value is found
        Returns:
        the value associated with the given key or the given default value if there is no value associated with the key
      • putBoolean

        boolean putBoolean​(String key,
                           boolean value)
        Deprecated.
        Put a boolean in the table
        Parameters:
        key - the key to be assigned to
        value - the value that will be assigned
        Returns:
        False if the table key already exists with a different type
      • setDefaultBoolean

        boolean setDefaultBoolean​(String key,
                                  boolean defaultValue)
        Deprecated.
        Gets the current value in the table, setting it if it does not exist.
        Parameters:
        key - the key
        defaultValue - the default value to set if key doens't exist.
        Returns:
        False if the table key exists with a different type
      • getBoolean

        boolean getBoolean​(String key,
                           boolean defaultValue)
        Deprecated.
        Returns the boolean the key maps to. If the key does not exist or is of different type, it will return the default value.
        Parameters:
        key - the key to look up
        defaultValue - the value to be returned if no value is found
        Returns:
        the value associated with the given key or the given default value if there is no value associated with the key
      • putBooleanArray

        boolean putBooleanArray​(String key,
                                boolean[] value)
        Deprecated.
        Put a boolean array in the table
        Parameters:
        key - the key to be assigned to
        value - the value that will be assigned
        Returns:
        False if the table key already exists with a different type
      • setDefaultBooleanArray

        boolean setDefaultBooleanArray​(String key,
                                       boolean[] defaultValue)
        Deprecated.
        Gets the current value in the table, setting it if it does not exist.
        Parameters:
        key - the key
        defaultValue - the default value to set if key doens't exist.
        Returns:
        False if the table key exists with a different type
      • putBooleanArray

        boolean putBooleanArray​(String key,
                                Boolean[] value)
        Deprecated.
        Put a boolean array in the table
        Parameters:
        key - the key to be assigned to
        value - the value that will be assigned
        Returns:
        False if the table key already exists with a different type
      • setDefaultBooleanArray

        boolean setDefaultBooleanArray​(String key,
                                       Boolean[] defaultValue)
        Deprecated.
        Gets the current value in the table, setting it if it does not exist.
        Parameters:
        key - the key
        defaultValue - the default value to set if key doens't exist.
        Returns:
        False if the table key exists with a different type
      • getBooleanArray

        boolean[] getBooleanArray​(String key,
                                  boolean[] defaultValue)
        Deprecated.
        Returns the boolean array the key maps to. If the key does not exist or is of different type, it will return the default value.
        Parameters:
        key - the key to look up
        defaultValue - the value to be returned if no value is found
        Returns:
        the value associated with the given key or the given default value if there is no value associated with the key
      • getBooleanArray

        Boolean[] getBooleanArray​(String key,
                                  Boolean[] defaultValue)
        Deprecated.
        Returns the boolean array the key maps to. If the key does not exist or is of different type, it will return the default value.
        Parameters:
        key - the key to look up
        defaultValue - the value to be returned if no value is found
        Returns:
        the value associated with the given key or the given default value if there is no value associated with the key
      • putNumberArray

        boolean putNumberArray​(String key,
                               double[] value)
        Deprecated.
        Put a number array in the table
        Parameters:
        key - the key to be assigned to
        value - the value that will be assigned
        Returns:
        False if the table key already exists with a different type
      • setDefaultNumberArray

        boolean setDefaultNumberArray​(String key,
                                      double[] defaultValue)
        Deprecated.
        Gets the current value in the table, setting it if it does not exist.
        Parameters:
        key - the key
        defaultValue - the default value to set if key doens't exist.
        Returns:
        False if the table key exists with a different type
      • putNumberArray

        boolean putNumberArray​(String key,
                               Double[] value)
        Deprecated.
        Put a number array in the table
        Parameters:
        key - the key to be assigned to
        value - the value that will be assigned
        Returns:
        False if the table key already exists with a different type
      • setDefaultNumberArray

        boolean setDefaultNumberArray​(String key,
                                      Double[] defaultValue)
        Deprecated.
        Gets the current value in the table, setting it if it does not exist.
        Parameters:
        key - the key
        defaultValue - the default value to set if key doens't exist.
        Returns:
        False if the table key exists with a different type
      • getNumberArray

        double[] getNumberArray​(String key,
                                double[] defaultValue)
        Deprecated.
        Returns the number array the key maps to. If the key does not exist or is of different type, it will return the default value.
        Parameters:
        key - the key to look up
        defaultValue - the value to be returned if no value is found
        Returns:
        the value associated with the given key or the given default value if there is no value associated with the key
      • getNumberArray

        Double[] getNumberArray​(String key,
                                Double[] defaultValue)
        Deprecated.
        Returns the number array the key maps to. If the key does not exist or is of different type, it will return the default value.
        Parameters:
        key - the key to look up
        defaultValue - the value to be returned if no value is found
        Returns:
        the value associated with the given key or the given default value if there is no value associated with the key
      • putStringArray

        boolean putStringArray​(String key,
                               String[] value)
        Deprecated.
        Put a string array in the table
        Parameters:
        key - the key to be assigned to
        value - the value that will be assigned
        Returns:
        False if the table key already exists with a different type
      • setDefaultStringArray

        boolean setDefaultStringArray​(String key,
                                      String[] defaultValue)
        Deprecated.
        Gets the current value in the table, setting it if it does not exist.
        Parameters:
        key - the key
        defaultValue - the default value to set if key doens't exist.
        Returns:
        False if the table key exists with a different type
      • getStringArray

        String[] getStringArray​(String key,
                                String[] defaultValue)
        Deprecated.
        Returns the string array the key maps to. If the key does not exist or is of different type, it will return the default value.
        Parameters:
        key - the key to look up
        defaultValue - the value to be returned if no value is found
        Returns:
        the value associated with the given key or the given default value if there is no value associated with the key
      • putRaw

        boolean putRaw​(String key,
                       byte[] value)
        Deprecated.
        Put a raw value (byte array) in the table
        Parameters:
        key - the key to be assigned to
        value - the value that will be assigned
        Returns:
        False if the table key already exists with a different type
      • setDefaultRaw

        boolean setDefaultRaw​(String key,
                              byte[] defaultValue)
        Deprecated.
        Gets the current value in the table, setting it if it does not exist.
        Parameters:
        key - the key
        defaultValue - the default value to set if key doens't exist.
        Returns:
        False if the table key exists with a different type
      • putRaw

        boolean putRaw​(String key,
                       ByteBuffer value,
                       int len)
        Deprecated.
        Put a raw value (bytes from a byte buffer) in the table
        Parameters:
        key - the key to be assigned to
        value - the value that will be assigned
        len - the length of the value
        Returns:
        False if the table key already exists with a different type
      • getRaw

        byte[] getRaw​(String key,
                      byte[] defaultValue)
        Deprecated.
        Returns the raw value (byte array) the key maps to. If the key does not exist or is of different type, it will return the default value.
        Parameters:
        key - the key to look up
        defaultValue - the value to be returned if no value is found
        Returns:
        the value associated with the given key or the given default value if there is no value associated with the key
      • addTableListener

        void addTableListener​(ITableListener listener)
        Deprecated.
        Add a listener for changes to the table
        Parameters:
        listener - the listener to add
      • addTableListener

        void addTableListener​(ITableListener listener,
                              boolean immediateNotify)
        Deprecated.
        Add a listener for changes to the table
        Parameters:
        listener - the listener to add
        immediateNotify - if true then this listener will be notified of all current entries (marked as new)
      • addTableListenerEx

        void addTableListenerEx​(ITableListener listener,
                                int flags)
        Deprecated.
        Add a listener for changes to the table
        Parameters:
        listener - the listener to add
        flags - bitmask specifying desired notifications
      • addTableListener

        void addTableListener​(String key,
                              ITableListener listener,
                              boolean immediateNotify)
        Deprecated.
        Add a listener for changes to a specific key the table
        Parameters:
        key - the key to listen for
        listener - the listener to add
        immediateNotify - if true then this listener will be notified of all current entries (marked as new)
      • addTableListenerEx

        void addTableListenerEx​(String key,
                                ITableListener listener,
                                int flags)
        Deprecated.
        Add a listener for changes to a specific key the table
        Parameters:
        key - the key to listen for
        listener - the listener to add
        flags - bitmask specifying desired notifications
      • addSubTableListener

        void addSubTableListener​(ITableListener listener)
        Deprecated.
        This will immediately notify the listener of all current sub tables
        Parameters:
        listener - the listener to notify
      • addSubTableListener

        void addSubTableListener​(ITableListener listener,
                                 boolean localNotify)
        Deprecated.
        This will immediately notify the listener of all current sub tables
        Parameters:
        listener - the listener to notify
        localNotify - if true then this listener will be notified of all local changes in addition to all remote changes
      • removeTableListener

        void removeTableListener​(ITableListener listener)
        Deprecated.
        Remove a listener from receiving table events
        Parameters:
        listener - the listener to be removed
      • putDouble

        @Deprecated
        boolean putDouble​(String key,
                          double value)
        Deprecated.
        Maps the specified key to the specified value in this table. The key can not be null. The value can be retrieved by calling the get method with a key that is equal to the original key.
        Parameters:
        key - the key
        value - the value
        Returns:
        False if the table key already exists with a different type
        Throws:
        IllegalArgumentException - if key is null
      • getPath

        String getPath()
        Deprecated.
        Gets the full path of this table. Does not include the trailing "/".
        Returns:
        The path to this table (e.g. "", "/foo").