choco.kernel.common.util.tools
Class PropertyUtils

java.lang.Object
  extended by choco.kernel.common.util.tools.PropertyUtils

public final class PropertyUtils
extends Object

see Configuration.

Since:
29 avr. 2010 version 2.1.1
Version:
2.1.1
Author:
Arnaud Malapert

Field Summary
static String TOOLS_PREFIX
           
 
Method Summary
static void loadProperties(Properties properties, File... files)
           
static void loadProperties(Properties properties, String... resources)
           
static void logOnAbsence(String key)
           
static void logOnFailure(String resource)
           
static void logOnSuccess(String resource)
           
static boolean readBoolean(Properties properties, String key, boolean defaultValue)
           
static double readDouble(Properties properties, String key, double defaultValue)
           
static
<T extends Enum<T>>
T
readEnum(Properties properties, String key, T defaultValue)
           
static int readInteger(Properties properties, String key, int defaultValue)
           
static String readString(Properties properties, String key, String defaultValue)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

TOOLS_PREFIX

public static final String TOOLS_PREFIX
See Also:
Constant Field Values
Method Detail

logOnAbsence

public static void logOnAbsence(String key)

logOnFailure

public static void logOnFailure(String resource)

logOnSuccess

public static void logOnSuccess(String resource)

loadProperties

public static void loadProperties(Properties properties,
                                  File... files)

loadProperties

public static void loadProperties(Properties properties,
                                  String... resources)

readBoolean

public static boolean readBoolean(Properties properties,
                                  String key,
                                  boolean defaultValue)

readInteger

public static int readInteger(Properties properties,
                              String key,
                              int defaultValue)

readDouble

public static double readDouble(Properties properties,
                                String key,
                                double defaultValue)

readString

public static String readString(Properties properties,
                                String key,
                                String defaultValue)

readEnum

public static <T extends Enum<T>> T readEnum(Properties properties,
                                             String key,
                                             T defaultValue)


Copyright © 2012. All Rights Reserved.