/** * Get an URI associated with the given configuration key. * * @param key The configuration key. * @return The associated URI. * * @throws ConversionException is thrown if the key maps to an * object that is not an URI. */ public URI getURI(final String key) { return get(URI.class, key); }
/** * Get an URL associated with the given configuration key. * * @param key The configuration key. * @return The associated URL. * * @throws ConversionException is thrown if the key maps to an * object that is not an URL. */ public URL getURL(final String key) { return get(URL.class, key); }
/** * Get a Locale associated with the given configuration key. * * @param key The configuration key. * @return The associated Locale. * * @throws ConversionException is thrown if the key maps to an * object that is not a Locale. */ public Locale getLocale(final String key) { return get(Locale.class, key); }
/** * Get a Color associated with the given configuration key. * * @param key The configuration key. * @return The associated Color. * * @throws ConversionException is thrown if the key maps to an * object that is not a Color. */ public Color getColor(final String key) { return get(Color.class, 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. * * @param key The configuration key. * @param defaultValue the default value, which will be returned if the property is not found * @return 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. */ public int[] getIntArray(final String key, final int[] defaultValue) { return get(int[].class, key, 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. * * @param key The configuration key. * @param defaultValue the default value, which will be returned if the property is not found * @return 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. */ public Locale[] getLocaleArray(final String key, final Locale[] defaultValue) { return get(Locale[].class, key, 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. * * @param key The configuration key. * @param defaultValue the default value, which will be returned if the property is not found * @return 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. */ public byte[] getByteArray(final String key, final byte[] defaultValue) { return get(byte[].class, key, 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. * * @param key The configuration key. * @param defaultValue the default value, which will be returned if the property is not found * @return 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. */ public BigInteger[] getBigIntegerArray(final String key, final BigInteger[] defaultValue) { return get(BigInteger[].class, key, 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. * * @param key The configuration key. * @param defaultValue The default value. * @return The associated URI. * * @throws ConversionException is thrown if the key maps to an * object that is not an URI. */ public URI getURI(final String key, final URI defaultValue) { return get(URI.class, key, 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 {@link #DATE_FORMAT_KEY} property, or if it's not defined * with the {@link #DEFAULT_DATE_FORMAT} pattern. * * @param key The configuration key. * @return The associated Calendar. * * @throws ConversionException is thrown if the key maps to an * object that is not a Calendar. */ public Calendar getCalendar(final String key) { return get(Calendar.class, key); }
/** * Get a Locale associated with the given configuration key. * If the key doesn't map to an existing object, the default value * is returned. * * @param key The configuration key. * @param defaultValue The default value. * @return The associated Locale. * * @throws ConversionException is thrown if the key maps to an * object that is not a Locale. */ public Locale getLocale(final String key, final Locale defaultValue) { return get(Locale.class, key, 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. * * @param key The configuration key. * @param defaultValue the default value, which will be returned if the property is not found * @return 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. */ public double[] getDoubleArray(final String key, final double[] defaultValue) { return get(double[].class, key, 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 {@link #DATE_FORMAT_KEY} property, or if it's not defined with the * {@link #DEFAULT_DATE_FORMAT} pattern. * * @param key The configuration key. * @return The associated Date. * * @throws ConversionException is thrown if the key maps to an * object that is not a Date. */ public Date getDate(final String key) { return get(Date.class, key); }
/** * Get a Color associated with the given configuration key. * If the key doesn't map to an existing object, the default value * is returned. * * @param key The configuration key. * @param defaultValue The default value. * @return The associated Color. * * @throws ConversionException is thrown if the key maps to an * object that is not a Color. */ public Color getColor(final String key, final Color defaultValue) { return get(Color.class, key, 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. * * @param key The configuration key. * @param defaultValue the default value, which will be returned if the property is not found * @return 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. */ public URI[] getURIArray(final String key, final URI[] defaultValue) { return get(URI[].class, key, 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. * * @param key The configuration key. * @param defaultValue the default value, which will be returned if the property is not found * @return 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. */ public URL[] getURLArray(final String key, final URL[] defaultValue) { return get(URL[].class, key, 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. * * @param key The configuration key. * @param defaultValue the default value, which will be returned if the property is not found * @return 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. */ public BigDecimal[] getBigDecimalArray(final String key, final BigDecimal[] defaultValue) { return get(BigDecimal[].class, key, 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. * * @param key The configuration key. * @param defaultValue The default value. * @return The associated URL. * * @throws ConversionException is thrown if the key maps to an * object that is not an URL. */ public URL getURL(final String key, final URL defaultValue) { return get(URL.class, key, 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. * * @param key The configuration key. * @param defaultValue the default value, which will be returned if the property is not found * @return 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. */ public Color[] getColorArray(final String key, final Color[] defaultValue) { return get(Color[].class, key, 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. * * @param key The configuration key. * @param defaultValue The default value. * @return 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. */ public boolean[] getBooleanArray(final String key, final boolean[] defaultValue) { return get(boolean[].class, key, defaultValue); }