Class TLcyStringProperties

java.lang.Object
com.luciad.lucy.util.properties.ALcyProperties
com.luciad.lucy.util.properties.TLcyStringProperties
All Implemented Interfaces:
ILcdPropertyChangeSource

public class TLcyStringProperties extends ALcyProperties
Default implementation of ALcyProperties that can only store String values. If an attempt is made to store other values, an IllegalArgumentException is thrown. Only accepting Strings allows to easily load and store all key-value pairs, compare differences, etc. One can think of this class as a java.util.Properties object with built-in support for several simple data types (e.g. int, int[], double, double[], boolean, ...) and events about changes.
  • Constructor Details

    • TLcyStringProperties

      public TLcyStringProperties()
      Default Constructor
  • Method Details

    • getImpl

      protected Object getImpl(String aKey)
      Description copied from class: ALcyProperties
      Implementation version of the get method, which retrieves the value from the underlying store.
      Specified by:
      getImpl in class ALcyProperties
      Parameters:
      aKey - The key, guaranteed to be not null.
      Returns:
      The value associated with the key, or null if no value is associated.
    • remove

      public void remove(String aKey)
      Description copied from class: ALcyProperties
      Removes the key (and its corresponding value) from this key-value pair list. This method does nothing if the key is unknown.
      Specified by:
      remove in class ALcyProperties
      Parameters:
      aKey - the key to be removed
    • size

      public int size()
      Description copied from class: ALcyProperties
      Returns the number of key-value pairs.
      Specified by:
      size in class ALcyProperties
      Returns:
      the number of key-value pairs.
    • containsKey

      public boolean containsKey(String aKey)
      Description copied from class: ALcyProperties
      Returns true if the key-value pair with the specified key exists.
      Specified by:
      containsKey in class ALcyProperties
      Parameters:
      aKey - key to look for
      Returns:
      true if the key-value pair with the specified key exists.
    • keys

      public Iterator<String> keys()
      Description copied from class: ALcyProperties
      Returns the keys of this TLcyProperties.
      Specified by:
      keys in class ALcyProperties
      Returns:
      the keys of this TLcyProperties.
    • clear

      public void clear()
      Description copied from class: ALcyProperties
      Clears this key-value pair list so that it contains no keys. Calling this method could result in a null-null-null property change event indicating all properties have changed, or in a separate event for all removed properties (implementation specific).
      Specified by:
      clear in class ALcyProperties
    • putImpl

      protected void putImpl(String aKey, Object aNewValue)
      Description copied from class: ALcyProperties
      Implementation version of the put method, which puts the value in the underlying store.
      Specified by:
      putImpl in class ALcyProperties
      Parameters:
      aKey - The key, guaranteed to be not null.
      aNewValue - The value to associate to the key, guaranteed to be not null.