/** * Returns the value as {@link Boolean} of the given key. * * <p> * Returns <code>null</code> if the key not exists of the value is null or empty. */ public static boolean getBoolean(Properties properties,String key){ return get(properties,key,Boolean.class); }
/** * Returns the value as {@link Integer} of the given key. * * <p> * Returns <code>null</null> if the key not exists of the value is null or empty. */ public static Integer getInteger(Properties properties,String key){ return get(properties,key,Integer.class); }
/** * Returns the value as {@link Integer} of the given key. * * <p> * Returns the given default value if the key not exists of the value is null or empty. */ public static int getInteger(Properties properties,String key,int defaultValue){ return get(properties,key,Integer.class,defaultValue); }
/** * Returns the value as {@link Boolean} of the given key. * * <p> * Returns the given default value if the key not exists of the value is null or empty. */ public static boolean getBoolean(Properties properties,String key,boolean defaultValue){ return get(properties,key,Boolean.class,defaultValue); }
public <T> T get(String key, Class<T> type) { return Props.get((PropertyGetter)this, key, type); }