Class DataConfiguration

  • All Implemented Interfaces:
    Configuration, EventSource, ImmutableConfiguration, SynchronizerSupport

    public class DataConfiguration
    extends AbstractConfiguration
    Decorator providing additional getters for any Configuration. This extended Configuration supports more types:
    • URL
    • Locale
    • Date
    • Calendar
    • Color
    • InetAddress
    • javax.mail.internet.InternetAddress (requires Javamail in the classpath)
    • Enum (Java 5 enumeration types)
    Lists and arrays are available for all types.
    Note that this class is only a thin wrapper over functionality already provided by AbstractConfiguration. Basically, the generic get(), and getCollection() methods are used to actually perform data conversions.

    Example

    Configuration file config.properties:
     title.color = #0000FF
     remote.host = 192.168.0.53
     default.locales = fr,en,de
     email.contact = ebourg@apache.org, tester@test.org
     
    Usage:
     DataConfiguration config = new DataConfiguration(new PropertiesConfiguration("config.properties"));
    
     // retrieve a property using a specialized getter
     Color color = config.getColor("title.color");
    
     // retrieve a property using a generic getter
     InetAddress host = (InetAddress) config.get(InetAddress.class, "remote.host");
     Locale[] locales = (Locale[]) config.getArray(Locale.class, "default.locales");
     List contacts = config.getList(InternetAddress.class, "email.contact");
     

    Dates

    Date objects are expected to be formatted with the pattern yyyy-MM-dd HH:mm:ss. This default format can be changed by specifying another format in the getters, or by putting a date format in the configuration under the key org.apache.commons.configuration.format.date. Alternatively, the date format can also be specified via the ConversionHandler used by a configuration instance:
     DefaultConversionHandler handler = new DefaultConversionHandler();
     handler.setDateFormat("mm/dd/yyyy");
     config.setConversionHandler(handler);
     
    Since:
    1.1
    Version:
    $Id: DataConfiguration.java 1790899 2017-04-10 21:56:46Z ggregory $
    Author:
    Emmanuel Bourg
    • Field Summary

      Fields 
      Modifier and Type Field Description
      static java.lang.String DATE_FORMAT_KEY
      The key of the property storing the user defined date format.
      static java.lang.String DEFAULT_DATE_FORMAT
      The default format for dates.
    • Constructor Summary

      Constructors 
      Constructor Description
      DataConfiguration​(Configuration configuration)
      Creates a new instance of DataConfiguration and sets the wrapped configuration.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      protected void addPropertyDirect​(java.lang.String key, java.lang.Object value)
      Adds a key/value pair to the Configuration.
      protected void addPropertyInternal​(java.lang.String key, java.lang.Object obj)
      Actually adds a property to this configuration.
      protected void clearPropertyDirect​(java.lang.String key)
      Removes the specified property from this configuration.
      protected boolean containsKeyInternal​(java.lang.String key)
      Actually checks whether the specified key is contained in this configuration.
      java.math.BigDecimal[] getBigDecimalArray​(java.lang.String key)
      Get an array of BigDecimals associated with the given configuration key.
      java.math.BigDecimal[] getBigDecimalArray​(java.lang.String key, java.math.BigDecimal[] defaultValue)
      Get an array of BigDecimals associated with the given configuration key.
      java.util.List<java.math.BigDecimal> getBigDecimalList​(java.lang.String key)
      Get a list of BigDecimals associated with the given configuration key.
      java.util.List<java.math.BigDecimal> getBigDecimalList​(java.lang.String key, java.util.List<java.math.BigDecimal> defaultValue)
      Get a list of BigDecimals associated with the given configuration key.
      java.math.BigInteger[] getBigIntegerArray​(java.lang.String key)
      Get an array of BigIntegers associated with the given configuration key.
      java.math.BigInteger[] getBigIntegerArray​(java.lang.String key, java.math.BigInteger[] defaultValue)
      Get an array of BigIntegers associated with the given configuration key.
      java.util.List<java.math.BigInteger> getBigIntegerList​(java.lang.String key)
      Get a list of BigIntegers associated with the given configuration key.
      java.util.List<java.math.BigInteger> getBigIntegerList​(java.lang.String key, java.util.List<java.math.BigInteger> defaultValue)
      Get a list of BigIntegers associated with the given configuration key.
      boolean[] getBooleanArray​(java.lang.String key)
      Get an array of boolean primitives associated with the given configuration key.
      boolean[] getBooleanArray​(java.lang.String key, boolean[] defaultValue)
      Get an array of boolean primitives associated with the given configuration key.
      java.util.List<java.lang.Boolean> getBooleanList​(java.lang.String key)
      Get a list of Boolean objects associated with the given configuration key.
      java.util.List<java.lang.Boolean> getBooleanList​(java.lang.String key, java.util.List<java.lang.Boolean> defaultValue)
      Get a list of Boolean objects associated with the given configuration key.
      byte[] getByteArray​(java.lang.String key)
      Get an array of byte primitives associated with the given configuration key.
      byte[] getByteArray​(java.lang.String key, byte[] defaultValue)
      Get an array of byte primitives associated with the given configuration key.
      java.util.List<java.lang.Byte> getByteList​(java.lang.String key)
      Get a list of Byte objects associated with the given configuration key.
      java.util.List<java.lang.Byte> getByteList​(java.lang.String key, java.util.List<java.lang.Byte> defaultValue)
      Get a list of Byte objects associated with the given configuration key.
      java.util.Calendar getCalendar​(java.lang.String key)
      Get a Calendar associated with the given configuration key.
      java.util.Calendar getCalendar​(java.lang.String key, java.lang.String format)
      Get a Calendar associated with the given configuration key.
      java.util.Calendar getCalendar​(java.lang.String key, java.util.Calendar defaultValue)
      Get a Calendar associated with the given configuration key.
      java.util.Calendar getCalendar​(java.lang.String key, java.util.Calendar defaultValue, java.lang.String format)
      Get a Calendar associated with the given configuration key.
      java.util.Calendar[] getCalendarArray​(java.lang.String key)
      Get an array of Calendars associated with the given configuration key.
      java.util.Calendar[] getCalendarArray​(java.lang.String key, java.lang.String format)
      Get an array of Calendars associated with the given configuration key.
      java.util.Calendar[] getCalendarArray​(java.lang.String key, java.util.Calendar[] defaultValue)
      Get an array of Calendars associated with the given configuration key.
      java.util.Calendar[] getCalendarArray​(java.lang.String key, java.util.Calendar[] defaultValue, java.lang.String format)
      Get an array of Calendars associated with the given configuration key.
      java.util.List<java.util.Calendar> getCalendarList​(java.lang.String key)
      Get a list of Calendars associated with the given configuration key.
      java.util.List<java.util.Calendar> getCalendarList​(java.lang.String key, java.lang.String format)
      Get a list of Calendars associated with the given configuration key.
      java.util.List<java.util.Calendar> getCalendarList​(java.lang.String key, java.util.List<java.util.Calendar> defaultValue)
      Get a list of Calendars associated with the given configuration key.
      java.util.List<java.util.Calendar> getCalendarList​(java.lang.String key, java.util.List<java.util.Calendar> defaultValue, java.lang.String format)
      Get a list of Calendars associated with the given configuration key.
      java.awt.Color getColor​(java.lang.String key)
      Get a Color associated with the given configuration key.
      java.awt.Color getColor​(java.lang.String key, java.awt.Color defaultValue)
      Get a Color associated with the given configuration key.
      java.awt.Color[] getColorArray​(java.lang.String key)
      Get an array of Colors associated with the given configuration key.
      java.awt.Color[] getColorArray​(java.lang.String key, java.awt.Color[] defaultValue)
      Get an array of Colors associated with the given configuration key.
      java.util.List<java.awt.Color> getColorList​(java.lang.String key)
      Get a list of Colors associated with the given configuration key.
      java.util.List<java.awt.Color> getColorList​(java.lang.String key, java.util.List<java.awt.Color> defaultValue)
      Get a list of Colors associated with the given configuration key.
      Configuration getConfiguration()
      Return the configuration decorated by this DataConfiguration.
      ConversionHandler getConversionHandler()
      Returns the ConversionHandler used by this instance.
      java.util.Date getDate​(java.lang.String key)
      Get a Date associated with the given configuration key.
      java.util.Date getDate​(java.lang.String key, java.lang.String format)
      Get a Date associated with the given configuration key.
      java.util.Date getDate​(java.lang.String key, java.util.Date defaultValue)
      Get a Date associated with the given configuration key.
      java.util.Date getDate​(java.lang.String key, java.util.Date defaultValue, java.lang.String format)
      Get a Date associated with the given configuration key.
      java.util.Date[] getDateArray​(java.lang.String key)
      Get an array of Dates associated with the given configuration key.
      java.util.Date[] getDateArray​(java.lang.String key, java.lang.String format)
      Get an array of Dates associated with the given configuration key.
      java.util.Date[] getDateArray​(java.lang.String key, java.util.Date[] defaultValue)
      Get an array of Dates associated with the given configuration key.
      java.util.Date[] getDateArray​(java.lang.String key, java.util.Date[] defaultValue, java.lang.String format)
      Get an array of Dates associated with the given configuration key.
      java.util.List<java.util.Date> getDateList​(java.lang.String key)  
      java.util.List<java.util.Date> getDateList​(java.lang.String key, java.lang.String format)
      Get a list of Dates associated with the given configuration key.
      java.util.List<java.util.Date> getDateList​(java.lang.String key, java.util.List<java.util.Date> defaultValue)
      Get a list of Dates associated with the given configuration key.
      java.util.List<java.util.Date> getDateList​(java.lang.String key, java.util.List<java.util.Date> defaultValue, java.lang.String format)
      Get a list of Dates associated with the given configuration key.
      double[] getDoubleArray​(java.lang.String key)
      Get an array of double primitives associated with the given configuration key.
      double[] getDoubleArray​(java.lang.String key, double[] defaultValue)
      Get an array of double primitives associated with the given configuration key.
      java.util.List<java.lang.Double> getDoubleList​(java.lang.String key)
      Get a list of Double objects associated with the given configuration key.
      java.util.List<java.lang.Double> getDoubleList​(java.lang.String key, java.util.List<java.lang.Double> defaultValue)
      Get a list of Double objects associated with the given configuration key.
      float[] getFloatArray​(java.lang.String key)
      Get an array of float primitives associated with the given configuration key.
      float[] getFloatArray​(java.lang.String key, float[] defaultValue)
      Get an array of float primitives associated with the given configuration key.
      java.util.List<java.lang.Float> getFloatList​(java.lang.String key)
      Get a list of Float objects associated with the given configuration key.
      java.util.List<java.lang.Float> getFloatList​(java.lang.String key, java.util.List<java.lang.Float> defaultValue)
      Get a list of Float objects associated with the given configuration key.
      int[] getIntArray​(java.lang.String key)
      Get an array of int primitives associated with the given configuration key.
      int[] getIntArray​(java.lang.String key, int[] defaultValue)
      Get an array of int primitives associated with the given configuration key.
      java.util.List<java.lang.Integer> getIntegerList​(java.lang.String key)
      Get a list of Integer objects associated with the given configuration key.
      java.util.List<java.lang.Integer> getIntegerList​(java.lang.String key, java.util.List<java.lang.Integer> defaultValue)
      Get a list of Integer objects associated with the given configuration key.
      protected java.util.Iterator<java.lang.String> getKeysInternal()
      Actually creates an iterator for iterating over the keys in this configuration.
      java.util.Locale getLocale​(java.lang.String key)
      Get a Locale associated with the given configuration key.
      java.util.Locale getLocale​(java.lang.String key, java.util.Locale defaultValue)
      Get a Locale associated with the given configuration key.
      java.util.Locale[] getLocaleArray​(java.lang.String key)
      Get an array of Locales associated with the given configuration key.
      java.util.Locale[] getLocaleArray​(java.lang.String key, java.util.Locale[] defaultValue)
      Get an array of Locales associated with the given configuration key.
      java.util.List<java.util.Locale> getLocaleList​(java.lang.String key)
      Get a list of Locales associated with the given configuration key.
      java.util.List<java.util.Locale> getLocaleList​(java.lang.String key, java.util.List<java.util.Locale> defaultValue)
      Get a list of Locales associated with the given configuration key.
      long[] getLongArray​(java.lang.String key)
      Get an array of long primitives associated with the given configuration key.
      long[] getLongArray​(java.lang.String key, long[] defaultValue)
      Get an array of long primitives associated with the given configuration key.
      java.util.List<java.lang.Long> getLongList​(java.lang.String key)
      Get a list of Long objects associated with the given configuration key.
      java.util.List<java.lang.Long> getLongList​(java.lang.String key, java.util.List<java.lang.Long> defaultValue)
      Get a list of Long objects associated with the given configuration key.
      protected java.lang.Object getPropertyInternal​(java.lang.String key)
      Actually obtains the value of the specified property.
      short[] getShortArray​(java.lang.String key)
      Get an array of short primitives associated with the given configuration key.
      short[] getShortArray​(java.lang.String key, short[] defaultValue)
      Get an array of short primitives associated with the given configuration key.
      java.util.List<java.lang.Short> getShortList​(java.lang.String key)
      Get a list of Short objects associated with the given configuration key.
      java.util.List<java.lang.Short> getShortList​(java.lang.String key, java.util.List<java.lang.Short> defaultValue)
      Get a list of Short objects associated with the given configuration key.
      java.net.URI getURI​(java.lang.String key)
      Get an URI associated with the given configuration key.
      java.net.URI getURI​(java.lang.String key, java.net.URI defaultValue)
      Get an URI associated with the given configuration key.
      java.net.URI[] getURIArray​(java.lang.String key)
      Get an array of URIs associated with the given configuration key.
      java.net.URI[] getURIArray​(java.lang.String key, java.net.URI[] defaultValue)
      Get an array of URIs associated with the given configuration key.
      java.util.List<java.net.URI> getURIList​(java.lang.String key)
      Get a list of URIs associated with the given configuration key.
      java.util.List<java.net.URI> getURIList​(java.lang.String key, java.util.List<java.net.URI> defaultValue)
      Get a list of URIs associated with the given configuration key.
      java.net.URL getURL​(java.lang.String key)
      Get an URL associated with the given configuration key.
      java.net.URL getURL​(java.lang.String key, java.net.URL defaultValue)
      Get an URL associated with the given configuration key.
      java.net.URL[] getURLArray​(java.lang.String key)
      Get an array of URLs associated with the given configuration key.
      java.net.URL[] getURLArray​(java.lang.String key, java.net.URL[] defaultValue)
      Get an array of URLs associated with the given configuration key.
      java.util.List<java.net.URL> getURLList​(java.lang.String key)
      Get a list of URLs associated with the given configuration key.
      java.util.List<java.net.URL> getURLList​(java.lang.String key, java.util.List<java.net.URL> defaultValue)
      Get a list of URLs associated with the given configuration key.
      protected boolean isEmptyInternal()
      Actually checks whether this configuration contains data.
      protected void setPropertyInternal​(java.lang.String key, java.lang.Object value)
      Actually sets the value of a property.
      • Methods inherited from class java.lang.Object

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

      • DATE_FORMAT_KEY

        public static final java.lang.String DATE_FORMAT_KEY
        The key of the property storing the user defined date format.
        See Also:
        Constant Field Values
      • DEFAULT_DATE_FORMAT

        public static final java.lang.String DEFAULT_DATE_FORMAT
        The default format for dates.
        See Also:
        Constant Field Values
    • Constructor Detail

      • DataConfiguration

        public DataConfiguration​(Configuration configuration)
        Creates a new instance of DataConfiguration and sets the wrapped configuration.
        Parameters:
        configuration - the wrapped configuration
    • Method Detail

      • getConfiguration

        public Configuration getConfiguration()
        Return the configuration decorated by this DataConfiguration.
        Returns:
        the wrapped configuration
      • getConversionHandler

        public ConversionHandler getConversionHandler()
        Returns the ConversionHandler used by this instance. This implementation returns the special conversion handler used by this configuration instance.
        Overrides:
        getConversionHandler in class AbstractConfiguration
        Returns:
        the ConversionHandler
      • getPropertyInternal

        protected java.lang.Object getPropertyInternal​(java.lang.String key)
        Description copied from class: AbstractConfiguration
        Actually obtains the value of the specified property. This method is called by getProperty(). Concrete subclasses must define it to fetch the value of the desired property.
        Specified by:
        getPropertyInternal in class AbstractConfiguration
        Parameters:
        key - the key of the property in question
        Returns:
        the (raw) value of this property
      • addPropertyDirect

        protected void addPropertyDirect​(java.lang.String key,
                                         java.lang.Object value)
        Description copied from class: AbstractConfiguration
        Adds a key/value pair to the Configuration. Override this method to provide write access to underlying Configuration store.
        Specified by:
        addPropertyDirect in class AbstractConfiguration
        Parameters:
        key - key to use for mapping
        value - object to store
      • isEmptyInternal

        protected boolean isEmptyInternal()
        Description copied from class: AbstractConfiguration
        Actually checks whether this configuration contains data. This method is called by isEmpty(). It has to be defined by concrete subclasses.
        Specified by:
        isEmptyInternal in class AbstractConfiguration
        Returns:
        true if this configuration contains no data, false otherwise
      • containsKeyInternal

        protected boolean containsKeyInternal​(java.lang.String key)
        Description copied from class: AbstractConfiguration
        Actually checks whether the specified key is contained in this configuration. This method is called by containsKey(). It has to be defined by concrete subclasses.
        Specified by:
        containsKeyInternal in class AbstractConfiguration
        Parameters:
        key - the key in question
        Returns:
        true if this key is contained in this configuration, false otherwise
      • clearPropertyDirect

        protected void clearPropertyDirect​(java.lang.String key)
        Description copied from class: AbstractConfiguration
        Removes the specified property from this configuration. This method is called by clearProperty() after it has done some preparations. It must be overridden in sub classes.
        Specified by:
        clearPropertyDirect in class AbstractConfiguration
        Parameters:
        key - the key to be removed
      • setPropertyInternal

        protected void setPropertyInternal​(java.lang.String key,
                                           java.lang.Object value)
        Description copied from class: AbstractConfiguration
        Actually sets the value of a property. This method is called by setProperty(). It provides a default implementation of this functionality by clearing the specified key and delegating to addProperty(). Subclasses should override this method if they can provide a more efficient algorithm for setting a property value.
        Overrides:
        setPropertyInternal in class AbstractConfiguration
        Parameters:
        key - the property key
        value - the new property value
      • getKeysInternal

        protected java.util.Iterator<java.lang.String> getKeysInternal()
        Description copied from class: AbstractConfiguration
        Actually creates an iterator for iterating over the keys in this configuration. This method is called by getKeys(), it has to be defined by concrete subclasses.
        Specified by:
        getKeysInternal in class AbstractConfiguration
        Returns:
        an Iterator with all property keys in this configuration
      • getBooleanList

        public java.util.List<java.lang.Boolean> getBooleanList​(java.lang.String key)
        Get a list of Boolean objects associated with the given configuration key. If the key doesn't map to an existing object an empty list is returned.
        Parameters:
        key - The configuration key.
        Returns:
        The associated Boolean list if the key is found.
        Throws:
        ConversionException - is thrown if the key maps to an object that is not a list of booleans.
      • getBooleanList

        public java.util.List<java.lang.Boolean> getBooleanList​(java.lang.String key,
                                                                java.util.List<java.lang.Boolean> defaultValue)
        Get a list of Boolean objects associated with the given configuration key. If the key doesn't map to an existing object, the default value is returned.
        Parameters:
        key - The configuration key.
        defaultValue - The default value.
        Returns:
        The associated List of Booleans.
        Throws:
        ConversionException - is thrown if the key maps to an object that is not a list of booleans.
      • getBooleanArray

        public boolean[] getBooleanArray​(java.lang.String key)
        Get an array of boolean primitives associated with the given configuration key. If the key doesn't map to an existing object an empty array is returned.
        Parameters:
        key - The configuration key.
        Returns:
        The associated boolean array if the key is found.
        Throws:
        ConversionException - is thrown if the key maps to an object that is not a list of booleans.
      • getBooleanArray

        public boolean[] getBooleanArray​(java.lang.String key,
                                         boolean[] defaultValue)
        Get an array of boolean primitives associated with the given configuration key. If the key doesn't map to an existing object, the default value is returned.
        Parameters:
        key - The configuration key.
        defaultValue - The default value.
        Returns:
        The associated boolean array if the key is found.
        Throws:
        ConversionException - is thrown if the key maps to an object that is not a list of booleans.
      • getByteList

        public java.util.List<java.lang.Byte> getByteList​(java.lang.String key)
        Get a list of Byte objects associated with the given configuration key. If the key doesn't map to an existing object an empty list is returned.
        Parameters:
        key - The configuration key.
        Returns:
        The associated Byte list if the key is found.
        Throws:
        ConversionException - is thrown if the key maps to an object that is not a list of bytes.
      • getByteList

        public java.util.List<java.lang.Byte> getByteList​(java.lang.String key,
                                                          java.util.List<java.lang.Byte> defaultValue)
        Get a list of Byte objects associated with the given configuration key. If the key doesn't map to an existing object, the default value is returned.
        Parameters:
        key - The configuration key.
        defaultValue - The default value.
        Returns:
        The associated List of Bytes.
        Throws:
        ConversionException - is thrown if the key maps to an object that is not a list of bytes.
      • getByteArray

        public byte[] getByteArray​(java.lang.String key)
        Get an array of byte primitives associated with the given configuration key. If the key doesn't map to an existing object an empty array is returned.
        Parameters:
        key - The configuration key.
        Returns:
        The associated byte array if the key is found.
        Throws:
        ConversionException - is thrown if the key maps to an object that is not a list of bytes.
      • getByteArray

        public byte[] getByteArray​(java.lang.String key,
                                   byte[] defaultValue)
        Get an array of byte primitives associated with the given configuration key. If the key doesn't map to an existing object an empty array is returned.
        Parameters:
        key - The configuration key.
        defaultValue - the default value, which will be returned if the property is not found
        Returns:
        The associated byte array if the key is found.
        Throws:
        ConversionException - is thrown if the key maps to an object that is not a list of bytes.
      • getShortList

        public java.util.List<java.lang.Short> getShortList​(java.lang.String key)
        Get a list of Short objects associated with the given configuration key. If the key doesn't map to an existing object an empty list is returned.
        Parameters:
        key - The configuration key.
        Returns:
        The associated Short list if the key is found.
        Throws:
        ConversionException - is thrown if the key maps to an object that is not a list of shorts.
      • getShortList

        public java.util.List<java.lang.Short> getShortList​(java.lang.String key,
                                                            java.util.List<java.lang.Short> defaultValue)
        Get a list of Short objects associated with the given configuration key. If the key doesn't map to an existing object, the default value is returned.
        Parameters:
        key - The configuration key.
        defaultValue - The default value.
        Returns:
        The associated List of Shorts.
        Throws:
        ConversionException - is thrown if the key maps to an object that is not a list of shorts.
      • getShortArray

        public short[] getShortArray​(java.lang.String key)
        Get an array of short primitives associated with the given configuration key. If the key doesn't map to an existing object an empty array is returned.
        Parameters:
        key - The configuration key.
        Returns:
        The associated short array if the key is found.
        Throws:
        ConversionException - is thrown if the key maps to an object that is not a list of shorts.
      • getShortArray

        public short[] getShortArray​(java.lang.String key,
                                     short[] defaultValue)
        Get an array of short primitives associated with the given configuration key. If the key doesn't map to an existing object an empty array is returned.
        Parameters:
        key - The configuration key.
        defaultValue - the default value, which will be returned if the property is not found
        Returns:
        The associated short array if the key is found.
        Throws:
        ConversionException - is thrown if the key maps to an object that is not a list of shorts.
      • getIntegerList

        public java.util.List<java.lang.Integer> getIntegerList​(java.lang.String key)
        Get a list of Integer objects associated with the given configuration key. If the key doesn't map to an existing object an empty list is returned.
        Parameters:
        key - The configuration key.
        Returns:
        The associated Integer list if the key is found.
        Throws:
        ConversionException - is thrown if the key maps to an object that is not a list of integers.
      • getIntegerList

        public java.util.List<java.lang.Integer> getIntegerList​(java.lang.String key,
                                                                java.util.List<java.lang.Integer> defaultValue)
        Get a list of Integer objects associated with the given configuration key. If the key doesn't map to an existing object, the default value is returned.
        Parameters:
        key - The configuration key.
        defaultValue - The default value.
        Returns:
        The associated List of Integers.
        Throws:
        ConversionException - is thrown if the key maps to an object that is not a list of integers.
      • getIntArray

        public int[] getIntArray​(java.lang.String key)
        Get an array of int primitives associated with the given configuration key. If the key doesn't map to an existing object an empty array is returned.
        Parameters:
        key - The configuration key.
        Returns:
        The associated int array if the key is found.
        Throws:
        ConversionException - is thrown if the key maps to an object that is not a list of integers.
      • getIntArray

        public int[] getIntArray​(java.lang.String key,
                                 int[] defaultValue)
        Get an array of int primitives associated with the given configuration key. If the key doesn't map to an existing object an empty array is returned.
        Parameters:
        key - The configuration key.
        defaultValue - the default value, which will be returned if the property is not found
        Returns:
        The associated int array if the key is found.
        Throws:
        ConversionException - is thrown if the key maps to an object that is not a list of integers.
      • getLongList

        public java.util.List<java.lang.Long> getLongList​(java.lang.String key)
        Get a list of Long objects associated with the given configuration key. If the key doesn't map to an existing object an empty list is returned.
        Parameters:
        key - The configuration key.
        Returns:
        The associated Long list if the key is found.
        Throws:
        ConversionException - is thrown if the key maps to an object that is not a list of longs.
      • getLongList

        public java.util.List<java.lang.Long> getLongList​(java.lang.String key,
                                                          java.util.List<java.lang.Long> defaultValue)
        Get a list of Long objects associated with the given configuration key. If the key doesn't map to an existing object, the default value is returned.
        Parameters:
        key - The configuration key.
        defaultValue - The default value.
        Returns:
        The associated List of Longs.
        Throws:
        ConversionException - is thrown if the key maps to an object that is not a list of longs.
      • getLongArray

        public long[] getLongArray​(java.lang.String key)
        Get an array of long primitives associated with the given configuration key. If the key doesn't map to an existing object an empty array is returned.
        Parameters:
        key - The configuration key.
        Returns:
        The associated long array if the key is found.
        Throws:
        ConversionException - is thrown if the key maps to an object that is not a list of longs.
      • getLongArray

        public long[] getLongArray​(java.lang.String key,
                                   long[] defaultValue)
        Get an array of long primitives associated with the given configuration key. If the key doesn't map to an existing object an empty array is returned.
        Parameters:
        key - The configuration key.
        defaultValue - the default value, which will be returned if the property is not found
        Returns:
        The associated long array if the key is found.
        Throws:
        ConversionException - is thrown if the key maps to an object that is not a list of longs.
      • getFloatList

        public java.util.List<java.lang.Float> getFloatList​(java.lang.String key)
        Get a list of Float objects associated with the given configuration key. If the key doesn't map to an existing object an empty list is returned.
        Parameters:
        key - The configuration key.
        Returns:
        The associated Float list if the key is found.
        Throws:
        ConversionException - is thrown if the key maps to an object that is not a list of floats.
      • getFloatList

        public java.util.List<java.lang.Float> getFloatList​(java.lang.String key,
                                                            java.util.List<java.lang.Float> defaultValue)
        Get a list of Float objects associated with the given configuration key. If the key doesn't map to an existing object, the default value is returned.
        Parameters:
        key - The configuration key.
        defaultValue - The default value.
        Returns:
        The associated List of Floats.
        Throws:
        ConversionException - is thrown if the key maps to an object that is not a list of floats.
      • getFloatArray

        public float[] getFloatArray​(java.lang.String key)
        Get an array of float primitives associated with the given configuration key. If the key doesn't map to an existing object an empty array is returned.
        Parameters:
        key - The configuration key.
        Returns:
        The associated float array if the key is found.
        Throws:
        ConversionException - is thrown if the key maps to an object that is not a list of floats.
      • getFloatArray

        public float[] getFloatArray​(java.lang.String key,
                                     float[] defaultValue)
        Get an array of float primitives associated with the given configuration key. If the key doesn't map to an existing object an empty array is returned.
        Parameters:
        key - The configuration key.
        defaultValue - the default value, which will be returned if the property is not found
        Returns:
        The associated float array if the key is found.
        Throws:
        ConversionException - is thrown if the key maps to an object that is not a list of floats.
      • getDoubleList

        public java.util.List<java.lang.Double> getDoubleList​(java.lang.String key)
        Get a list of Double objects associated with the given configuration key. If the key doesn't map to an existing object an empty list is returned.
        Parameters:
        key - The configuration key.
        Returns:
        The associated Double list if the key is found.
        Throws:
        ConversionException - is thrown if the key maps to an object that is not a list of doubles.
      • getDoubleList

        public java.util.List<java.lang.Double> getDoubleList​(java.lang.String key,
                                                              java.util.List<java.lang.Double> defaultValue)
        Get a list of Double objects associated with the given configuration key. If the key doesn't map to an existing object, the default value is returned.
        Parameters:
        key - The configuration key.
        defaultValue - The default value.
        Returns:
        The associated List of Doubles.
        Throws:
        ConversionException - is thrown if the key maps to an object that is not a list of doubles.
      • getDoubleArray

        public double[] getDoubleArray​(java.lang.String key)
        Get an array of double primitives associated with the given configuration key. If the key doesn't map to an existing object an empty array is returned.
        Parameters:
        key - The configuration key.
        Returns:
        The associated double array if the key is found.
        Throws:
        ConversionException - is thrown if the key maps to an object that is not a list of doubles.
      • getDoubleArray

        public double[] getDoubleArray​(java.lang.String key,
                                       double[] defaultValue)
        Get an array of double primitives associated with the given configuration key. If the key doesn't map to an existing object an empty array is returned.
        Parameters:
        key - The configuration key.
        defaultValue - the default value, which will be returned if the property is not found
        Returns:
        The associated double array if the key is found.
        Throws:
        ConversionException - is thrown if the key maps to an object that is not a list of doubles.
      • getBigIntegerList

        public java.util.List<java.math.BigInteger> getBigIntegerList​(java.lang.String key)
        Get a list of BigIntegers associated with the given configuration key. If the key doesn't map to an existing object an empty list is returned.
        Parameters:
        key - The configuration key.
        Returns:
        The associated BigInteger list if the key is found.
        Throws:
        ConversionException - is thrown if the key maps to an object that is not a list of BigIntegers.
      • getBigIntegerList

        public java.util.List<java.math.BigInteger> getBigIntegerList​(java.lang.String key,
                                                                      java.util.List<java.math.BigInteger> defaultValue)
        Get a list of BigIntegers associated with the given configuration key. If the key doesn't map to an existing object, the default value is returned.
        Parameters:
        key - The configuration key.
        defaultValue - The default value.
        Returns:
        The associated List of BigIntegers.
        Throws:
        ConversionException - is thrown if the key maps to an object that is not a list of BigIntegers.
      • getBigIntegerArray

        public java.math.BigInteger[] getBigIntegerArray​(java.lang.String key)
        Get an array of BigIntegers associated with the given configuration key. If the key doesn't map to an existing object an empty array is returned.
        Parameters:
        key - The configuration key.
        Returns:
        The associated BigInteger array if the key is found.
        Throws:
        ConversionException - is thrown if the key maps to an object that is not a list of BigIntegers.
      • getBigIntegerArray

        public java.math.BigInteger[] getBigIntegerArray​(java.lang.String key,
                                                         java.math.BigInteger[] defaultValue)
        Get an array of BigIntegers associated with the given configuration key. If the key doesn't map to an existing object an empty array is returned.
        Parameters:
        key - The configuration key.
        defaultValue - the default value, which will be returned if the property is not found
        Returns:
        The associated BigInteger array if the key is found.
        Throws:
        ConversionException - is thrown if the key maps to an object that is not a list of BigIntegers.
      • getBigDecimalList

        public java.util.List<java.math.BigDecimal> getBigDecimalList​(java.lang.String key)
        Get a list of BigDecimals associated with the given configuration key. If the key doesn't map to an existing object an empty list is returned.
        Parameters:
        key - The configuration key.
        Returns:
        The associated BigDecimal list if the key is found.
        Throws:
        ConversionException - is thrown if the key maps to an object that is not a list of BigDecimals.
      • getBigDecimalList

        public java.util.List<java.math.BigDecimal> getBigDecimalList​(java.lang.String key,
                                                                      java.util.List<java.math.BigDecimal> defaultValue)
        Get a list of BigDecimals associated with the given configuration key. If the key doesn't map to an existing object, the default value is returned.
        Parameters:
        key - The configuration key.
        defaultValue - The default value.
        Returns:
        The associated List of BigDecimals.
        Throws:
        ConversionException - is thrown if the key maps to an object that is not a list of BigDecimals.
      • getBigDecimalArray

        public java.math.BigDecimal[] getBigDecimalArray​(java.lang.String key)
        Get an array of BigDecimals associated with the given configuration key. If the key doesn't map to an existing object an empty array is returned.
        Parameters:
        key - The configuration key.
        Returns:
        The associated BigDecimal array if the key is found.
        Throws:
        ConversionException - is thrown if the key maps to an object that is not a list of BigDecimals.
      • getBigDecimalArray

        public java.math.BigDecimal[] getBigDecimalArray​(java.lang.String key,
                                                         java.math.BigDecimal[] defaultValue)
        Get an array of BigDecimals associated with the given configuration key. If the key doesn't map to an existing object an empty array is returned.
        Parameters:
        key - The configuration key.
        defaultValue - the default value, which will be returned if the property is not found
        Returns:
        The associated BigDecimal array if the key is found.
        Throws:
        ConversionException - is thrown if the key maps to an object that is not a list of BigDecimals.
      • getURI

        public java.net.URI getURI​(java.lang.String key)
        Get an URI associated with the given configuration key.
        Parameters:
        key - The configuration key.
        Returns:
        The associated URI.
        Throws:
        ConversionException - is thrown if the key maps to an object that is not an URI.
      • getURI

        public java.net.URI getURI​(java.lang.String key,
                                   java.net.URI defaultValue)
        Get an URI associated with the given configuration key. If the key doesn't map to an existing object, the default value is returned.
        Parameters:
        key - The configuration key.
        defaultValue - The default value.
        Returns:
        The associated URI.
        Throws:
        ConversionException - is thrown if the key maps to an object that is not an URI.
      • getURIArray

        public java.net.URI[] getURIArray​(java.lang.String key)
        Get an array of URIs associated with the given configuration key. If the key doesn't map to an existing object an empty array is returned.
        Parameters:
        key - The configuration key.
        Returns:
        The associated URI array if the key is found.
        Throws:
        ConversionException - is thrown if the key maps to an object that is not a list of URIs.
      • getURIArray

        public java.net.URI[] getURIArray​(java.lang.String key,
                                          java.net.URI[] defaultValue)
        Get an array of URIs associated with the given configuration key. If the key doesn't map to an existing object an empty array is returned.
        Parameters:
        key - The configuration key.
        defaultValue - the default value, which will be returned if the property is not found
        Returns:
        The associated URI array if the key is found.
        Throws:
        ConversionException - is thrown if the key maps to an object that is not a list of URIs.
      • getURIList

        public java.util.List<java.net.URI> getURIList​(java.lang.String key)
        Get a list of URIs associated with the given configuration key. If the key doesn't map to an existing object an empty list is returned.
        Parameters:
        key - The configuration key.
        Returns:
        The associated URI list if the key is found.
        Throws:
        ConversionException - is thrown if the key maps to an object that is not a list of URIs.
      • getURIList

        public java.util.List<java.net.URI> getURIList​(java.lang.String key,
                                                       java.util.List<java.net.URI> defaultValue)
        Get a list of URIs associated with the given configuration key. If the key doesn't map to an existing object, the default value is returned.
        Parameters:
        key - The configuration key.
        defaultValue - The default value.
        Returns:
        The associated List of URIs.
        Throws:
        ConversionException - is thrown if the key maps to an object that is not a list of URIs.
      • getURL

        public java.net.URL getURL​(java.lang.String key)
        Get an URL associated with the given configuration key.
        Parameters:
        key - The configuration key.
        Returns:
        The associated URL.
        Throws:
        ConversionException - is thrown if the key maps to an object that is not an URL.
      • getURL

        public java.net.URL getURL​(java.lang.String key,
                                   java.net.URL defaultValue)
        Get an URL associated with the given configuration key. If the key doesn't map to an existing object, the default value is returned.
        Parameters:
        key - The configuration key.
        defaultValue - The default value.
        Returns:
        The associated URL.
        Throws:
        ConversionException - is thrown if the key maps to an object that is not an URL.
      • getURLList

        public java.util.List<java.net.URL> getURLList​(java.lang.String key)
        Get a list of URLs associated with the given configuration key. If the key doesn't map to an existing object an empty list is returned.
        Parameters:
        key - The configuration key.
        Returns:
        The associated URL list if the key is found.
        Throws:
        ConversionException - is thrown if the key maps to an object that is not a list of URLs.
      • getURLList

        public java.util.List<java.net.URL> getURLList​(java.lang.String key,
                                                       java.util.List<java.net.URL> defaultValue)
        Get a list of URLs associated with the given configuration key. If the key doesn't map to an existing object, the default value is returned.
        Parameters:
        key - The configuration key.
        defaultValue - The default value.
        Returns:
        The associated List of URLs.
        Throws:
        ConversionException - is thrown if the key maps to an object that is not a list of URLs.
      • getURLArray

        public java.net.URL[] getURLArray​(java.lang.String key)
        Get an array of URLs associated with the given configuration key. If the key doesn't map to an existing object an empty array is returned.
        Parameters:
        key - The configuration key.
        Returns:
        The associated URL array if the key is found.
        Throws:
        ConversionException - is thrown if the key maps to an object that is not a list of URLs.
      • getURLArray

        public java.net.URL[] getURLArray​(java.lang.String key,
                                          java.net.URL[] defaultValue)
        Get an array of URLs associated with the given configuration key. If the key doesn't map to an existing object an empty array is returned.
        Parameters:
        key - The configuration key.
        defaultValue - the default value, which will be returned if the property is not found
        Returns:
        The associated URL array if the key is found.
        Throws:
        ConversionException - is thrown if the key maps to an object that is not a list of URLs.
      • getDate

        public java.util.Date getDate​(java.lang.String key)
        Get a Date associated with the given configuration key. If the property is a String, it will be parsed with the format defined by the user in the DATE_FORMAT_KEY property, or if it's not defined with the DEFAULT_DATE_FORMAT pattern.
        Parameters:
        key - The configuration key.
        Returns:
        The associated Date.
        Throws:
        ConversionException - is thrown if the key maps to an object that is not a Date.
      • getDate

        public java.util.Date getDate​(java.lang.String key,
                                      java.lang.String format)
        Get a Date associated with the given configuration key. If the property is a String, it will be parsed with the specified format pattern.
        Parameters:
        key - The configuration key.
        format - The non-localized DateFormat pattern.
        Returns:
        The associated Date
        Throws:
        ConversionException - is thrown if the key maps to an object that is not a Date.
      • getDate

        public java.util.Date getDate​(java.lang.String key,
                                      java.util.Date defaultValue)
        Get a Date associated with the given configuration key. If the property is a String, it will be parsed with the format defined by the user in the DATE_FORMAT_KEY property, or if it's not defined with the DEFAULT_DATE_FORMAT pattern. If the key doesn't map to an existing object, the default value is returned.
        Parameters:
        key - The configuration key.
        defaultValue - The default value.
        Returns:
        The associated Date.
        Throws:
        ConversionException - is thrown if the key maps to an object that is not a Date.
      • getDate

        public java.util.Date getDate​(java.lang.String key,
                                      java.util.Date defaultValue,
                                      java.lang.String format)
        Get a Date associated with the given configuration key. If the property is a String, it will be parsed with the specified format pattern. If the key doesn't map to an existing object, the default value is returned.
        Parameters:
        key - The configuration key.
        defaultValue - The default value.
        format - The non-localized DateFormat pattern.
        Returns:
        The associated Date.
        Throws:
        ConversionException - is thrown if the key maps to an object that is not a Date.
      • getDateList

        public java.util.List<java.util.Date> getDateList​(java.lang.String key)
      • getDateList

        public java.util.List<java.util.Date> getDateList​(java.lang.String key,
                                                          java.lang.String format)
        Get a list of Dates associated with the given configuration key. If the property is a list of Strings, they will be parsed with the specified format pattern. If the key doesn't map to an existing object an empty list is returned.
        Parameters:
        key - The configuration key.
        format - The non-localized DateFormat pattern.
        Returns:
        The associated Date list if the key is found.
        Throws:
        ConversionException - is thrown if the key maps to an object that is not a list of Dates.
      • getDateList

        public java.util.List<java.util.Date> getDateList​(java.lang.String key,
                                                          java.util.List<java.util.Date> defaultValue)
        Get a list of Dates associated with the given configuration key. If the property is a list of Strings, they will be parsed with the format defined by the user in the DATE_FORMAT_KEY property, or if it's not defined with the DEFAULT_DATE_FORMAT pattern. If the key doesn't map to an existing object, the default value is returned.
        Parameters:
        key - The configuration key.
        defaultValue - The default value.
        Returns:
        The associated Date list if the key is found.
        Throws:
        ConversionException - is thrown if the key maps to an object that is not a list of Dates.
      • getDateList

        public java.util.List<java.util.Date> getDateList​(java.lang.String key,
                                                          java.util.List<java.util.Date> defaultValue,
                                                          java.lang.String format)
        Get a list of Dates associated with the given configuration key. If the property is a list of Strings, they will be parsed with the specified format pattern. If the key doesn't map to an existing object, the default value is returned.
        Parameters:
        key - The configuration key.
        defaultValue - The default value.
        format - The non-localized DateFormat pattern.
        Returns:
        The associated Date list if the key is found.
        Throws:
        ConversionException - is thrown if the key maps to an object that is not a list of Dates.
      • getDateArray

        public java.util.Date[] getDateArray​(java.lang.String key)
        Get an array of Dates associated with the given configuration key. If the property is a list of Strings, they will be parsed with the format defined by the user in the DATE_FORMAT_KEY property, or if it's not defined with the DEFAULT_DATE_FORMAT pattern. If the key doesn't map to an existing object an empty array is returned.
        Parameters:
        key - The configuration key.
        Returns:
        The associated Date array if the key is found.
        Throws:
        ConversionException - is thrown if the key maps to an object that is not a list of Dates.
      • getDateArray

        public java.util.Date[] getDateArray​(java.lang.String key,
                                             java.lang.String format)
        Get an array of Dates associated with the given configuration key. If the property is a list of Strings, they will be parsed with the specified format pattern. If the key doesn't map to an existing object an empty array is returned.
        Parameters:
        key - The configuration key.
        format - The non-localized DateFormat pattern.
        Returns:
        The associated Date array if the key is found.
        Throws:
        ConversionException - is thrown if the key maps to an object that is not a list of Dates.
      • getDateArray

        public java.util.Date[] getDateArray​(java.lang.String key,
                                             java.util.Date[] defaultValue)
        Get an array of Dates associated with the given configuration key. If the property is a list of Strings, they will be parsed with the format defined by the user in the DATE_FORMAT_KEY property, or if it's not defined with the DEFAULT_DATE_FORMAT pattern. If the key doesn't map to an existing object an empty array is returned.
        Parameters:
        key - The configuration key.
        defaultValue - the default value, which will be returned if the property is not found
        Returns:
        The associated Date array if the key is found.
        Throws:
        ConversionException - is thrown if the key maps to an object that is not a list of Dates.
      • getDateArray

        public java.util.Date[] getDateArray​(java.lang.String key,
                                             java.util.Date[] defaultValue,
                                             java.lang.String format)
        Get an array of Dates associated with the given configuration key. If the property is a list of Strings, they will be parsed with the specified format pattern. If the key doesn't map to an existing object, the default value is returned.
        Parameters:
        key - The configuration key.
        defaultValue - The default value.
        format - The non-localized DateFormat pattern.
        Returns:
        The associated Date array if the key is found.
        Throws:
        ConversionException - is thrown if the key maps to an object that is not a list of Dates.
      • getCalendar

        public java.util.Calendar getCalendar​(java.lang.String key)
        Get a Calendar associated with the given configuration key. If the property is a String, it will be parsed with the format defined by the user in the DATE_FORMAT_KEY property, or if it's not defined with the DEFAULT_DATE_FORMAT pattern.
        Parameters:
        key - The configuration key.
        Returns:
        The associated Calendar.
        Throws:
        ConversionException - is thrown if the key maps to an object that is not a Calendar.
      • getCalendar

        public java.util.Calendar getCalendar​(java.lang.String key,
                                              java.lang.String format)
        Get a Calendar associated with the given configuration key. If the property is a String, it will be parsed with the specified format pattern.
        Parameters:
        key - The configuration key.
        format - The non-localized DateFormat pattern.
        Returns:
        The associated Calendar
        Throws:
        ConversionException - is thrown if the key maps to an object that is not a Calendar.
      • getCalendar

        public java.util.Calendar getCalendar​(java.lang.String key,
                                              java.util.Calendar defaultValue)
        Get a Calendar associated with the given configuration key. If the property is a String, it will be parsed with the format defined by the user in the DATE_FORMAT_KEY property, or if it's not defined with the DEFAULT_DATE_FORMAT pattern. If the key doesn't map to an existing object, the default value is returned.
        Parameters:
        key - The configuration key.
        defaultValue - The default value.
        Returns:
        The associated Calendar.
        Throws:
        ConversionException - is thrown if the key maps to an object that is not a Calendar.
      • getCalendar

        public java.util.Calendar getCalendar​(java.lang.String key,
                                              java.util.Calendar defaultValue,
                                              java.lang.String format)
        Get a Calendar associated with the given configuration key. If the property is a String, it will be parsed with the specified format pattern. If the key doesn't map to an existing object, the default value is returned.
        Parameters:
        key - The configuration key.
        defaultValue - The default value.
        format - The non-localized DateFormat pattern.
        Returns:
        The associated Calendar.
        Throws:
        ConversionException - is thrown if the key maps to an object that is not a Calendar.
      • getCalendarList

        public java.util.List<java.util.Calendar> getCalendarList​(java.lang.String key)
        Get a list of Calendars associated with the given configuration key. If the property is a list of Strings, they will be parsed with the format defined by the user in the DATE_FORMAT_KEY property, or if it's not defined with the DEFAULT_DATE_FORMAT pattern. If the key doesn't map to an existing object an empty list is returned.
        Parameters:
        key - The configuration key.
        Returns:
        The associated Calendar list if the key is found.
        Throws:
        ConversionException - is thrown if the key maps to an object that is not a list of Calendars.
      • getCalendarList

        public java.util.List<java.util.Calendar> getCalendarList​(java.lang.String key,
                                                                  java.lang.String format)
        Get a list of Calendars associated with the given configuration key. If the property is a list of Strings, they will be parsed with the specified format pattern. If the key doesn't map to an existing object an empty list is returned.
        Parameters:
        key - The configuration key.
        format - The non-localized DateFormat pattern.
        Returns:
        The associated Calendar list if the key is found.
        Throws:
        ConversionException - is thrown if the key maps to an object that is not a list of Calendars.
      • getCalendarList

        public java.util.List<java.util.Calendar> getCalendarList​(java.lang.String key,
                                                                  java.util.List<java.util.Calendar> defaultValue)
        Get a list of Calendars associated with the given configuration key. If the property is a list of Strings, they will be parsed with the format defined by the user in the DATE_FORMAT_KEY property, or if it's not defined with the DEFAULT_DATE_FORMAT pattern. If the key doesn't map to an existing object, the default value is returned.
        Parameters:
        key - The configuration key.
        defaultValue - The default value.
        Returns:
        The associated Calendar list if the key is found.
        Throws:
        ConversionException - is thrown if the key maps to an object that is not a list of Calendars.
      • getCalendarList

        public java.util.List<java.util.Calendar> getCalendarList​(java.lang.String key,
                                                                  java.util.List<java.util.Calendar> defaultValue,
                                                                  java.lang.String format)
        Get a list of Calendars associated with the given configuration key. If the property is a list of Strings, they will be parsed with the specified format pattern. If the key doesn't map to an existing object, the default value is returned.
        Parameters:
        key - The configuration key.
        defaultValue - The default value.
        format - The non-localized DateFormat pattern.
        Returns:
        The associated Calendar list if the key is found.
        Throws:
        ConversionException - is thrown if the key maps to an object that is not a list of Calendars.
      • getCalendarArray

        public java.util.Calendar[] getCalendarArray​(java.lang.String key)
        Get an array of Calendars associated with the given configuration key. If the property is a list of Strings, they will be parsed with the format defined by the user in the DATE_FORMAT_KEY property, or if it's not defined with the DEFAULT_DATE_FORMAT pattern. If the key doesn't map to an existing object an empty array is returned.
        Parameters:
        key - The configuration key.
        Returns:
        The associated Calendar array if the key is found.
        Throws:
        ConversionException - is thrown if the key maps to an object that is not a list of Calendars.
      • getCalendarArray

        public java.util.Calendar[] getCalendarArray​(java.lang.String key,
                                                     java.lang.String format)
        Get an array of Calendars associated with the given configuration key. If the property is a list of Strings, they will be parsed with the specified format pattern. If the key doesn't map to an existing object an empty array is returned.
        Parameters:
        key - The configuration key.
        format - The non-localized DateFormat pattern.
        Returns:
        The associated Calendar array if the key is found.
        Throws:
        ConversionException - is thrown if the key maps to an object that is not a list of Calendars.
      • getCalendarArray

        public java.util.Calendar[] getCalendarArray​(java.lang.String key,
                                                     java.util.Calendar[] defaultValue)
        Get an array of Calendars associated with the given configuration key. If the property is a list of Strings, they will be parsed with the format defined by the user in the DATE_FORMAT_KEY property, or if it's not defined with the DEFAULT_DATE_FORMAT pattern. If the key doesn't map to an existing object an empty array is returned.
        Parameters:
        key - The configuration key.
        defaultValue - the default value, which will be returned if the property is not found
        Returns:
        The associated Calendar array if the key is found.
        Throws:
        ConversionException - is thrown if the key maps to an object that is not a list of Calendars.
      • getCalendarArray

        public java.util.Calendar[] getCalendarArray​(java.lang.String key,
                                                     java.util.Calendar[] defaultValue,
                                                     java.lang.String format)
        Get an array of Calendars associated with the given configuration key. If the property is a list of Strings, they will be parsed with the specified format pattern. If the key doesn't map to an existing object, the default value is returned.
        Parameters:
        key - The configuration key.
        defaultValue - The default value.
        format - The non-localized DateFormat pattern.
        Returns:
        The associated Calendar array if the key is found.
        Throws:
        ConversionException - is thrown if the key maps to an object that is not a list of Calendars.
      • getLocale

        public java.util.Locale getLocale​(java.lang.String key)
        Get a Locale associated with the given configuration key.
        Parameters:
        key - The configuration key.
        Returns:
        The associated Locale.
        Throws:
        ConversionException - is thrown if the key maps to an object that is not a Locale.
      • getLocale

        public java.util.Locale getLocale​(java.lang.String key,
                                          java.util.Locale defaultValue)
        Get a Locale associated with the given configuration key. If the key doesn't map to an existing object, the default value is returned.
        Parameters:
        key - The configuration key.
        defaultValue - The default value.
        Returns:
        The associated Locale.
        Throws:
        ConversionException - is thrown if the key maps to an object that is not a Locale.
      • getLocaleList

        public java.util.List<java.util.Locale> getLocaleList​(java.lang.String key)
        Get a list of Locales associated with the given configuration key. If the key doesn't map to an existing object an empty list is returned.
        Parameters:
        key - The configuration key.
        Returns:
        The associated Locale list if the key is found.
        Throws:
        ConversionException - is thrown if the key maps to an object that is not a list of Locales.
      • getLocaleList

        public java.util.List<java.util.Locale> getLocaleList​(java.lang.String key,
                                                              java.util.List<java.util.Locale> defaultValue)
        Get a list of Locales associated with the given configuration key. If the key doesn't map to an existing object, the default value is returned.
        Parameters:
        key - The configuration key.
        defaultValue - The default value.
        Returns:
        The associated List of Locales.
        Throws:
        ConversionException - is thrown if the key maps to an object that is not a list of Locales.
      • getLocaleArray

        public java.util.Locale[] getLocaleArray​(java.lang.String key)
        Get an array of Locales associated with the given configuration key. If the key doesn't map to an existing object an empty array is returned.
        Parameters:
        key - The configuration key.
        Returns:
        The associated Locale array if the key is found.
        Throws:
        ConversionException - is thrown if the key maps to an object that is not a list of Locales.
      • getLocaleArray

        public java.util.Locale[] getLocaleArray​(java.lang.String key,
                                                 java.util.Locale[] defaultValue)
        Get an array of Locales associated with the given configuration key. If the key doesn't map to an existing object an empty array is returned.
        Parameters:
        key - The configuration key.
        defaultValue - the default value, which will be returned if the property is not found
        Returns:
        The associated Locale array if the key is found.
        Throws:
        ConversionException - is thrown if the key maps to an object that is not a list of Locales.
      • getColor

        public java.awt.Color getColor​(java.lang.String key)
        Get a Color associated with the given configuration key.
        Parameters:
        key - The configuration key.
        Returns:
        The associated Color.
        Throws:
        ConversionException - is thrown if the key maps to an object that is not a Color.
      • getColor

        public java.awt.Color getColor​(java.lang.String key,
                                       java.awt.Color defaultValue)
        Get a Color associated with the given configuration key. If the key doesn't map to an existing object, the default value is returned.
        Parameters:
        key - The configuration key.
        defaultValue - The default value.
        Returns:
        The associated Color.
        Throws:
        ConversionException - is thrown if the key maps to an object that is not a Color.
      • getColorList

        public java.util.List<java.awt.Color> getColorList​(java.lang.String key)
        Get a list of Colors associated with the given configuration key. If the key doesn't map to an existing object an empty list is returned.
        Parameters:
        key - The configuration key.
        Returns:
        The associated Color list if the key is found.
        Throws:
        ConversionException - is thrown if the key maps to an object that is not a list of Colors.
      • getColorList

        public java.util.List<java.awt.Color> getColorList​(java.lang.String key,
                                                           java.util.List<java.awt.Color> defaultValue)
        Get a list of Colors associated with the given configuration key. If the key doesn't map to an existing object, the default value is returned.
        Parameters:
        key - The configuration key.
        defaultValue - The default value.
        Returns:
        The associated List of Colors.
        Throws:
        ConversionException - is thrown if the key maps to an object that is not a list of Colors.
      • getColorArray

        public java.awt.Color[] getColorArray​(java.lang.String key)
        Get an array of Colors associated with the given configuration key. If the key doesn't map to an existing object an empty array is returned.
        Parameters:
        key - The configuration key.
        Returns:
        The associated Color array if the key is found.
        Throws:
        ConversionException - is thrown if the key maps to an object that is not a list of Colors.
      • getColorArray

        public java.awt.Color[] getColorArray​(java.lang.String key,
                                              java.awt.Color[] defaultValue)
        Get an array of Colors associated with the given configuration key. If the key doesn't map to an existing object an empty array is returned.
        Parameters:
        key - The configuration key.
        defaultValue - the default value, which will be returned if the property is not found
        Returns:
        The associated Color array if the key is found.
        Throws:
        ConversionException - is thrown if the key maps to an object that is not a list of Colors.