org.apache.openejb.util
Class Options

java.lang.Object
  extended by org.apache.openejb.util.Options

public class Options
extends Object

Version:
$Rev: 751333 $ $Date: 2009-03-07 14:29:29 -0800 (Sat, 07 Mar 2009) $

Constructor Summary
Options()
           
 
Method Summary
static boolean getBoolean(Properties p, String property, boolean defaultValue)
           
static
<T extends Enum<T>>
T
getEnum(Properties p, String property, T defaultValue)
           
static
<T extends Enum<T>>
Set<T>
getEnums(Properties p, String property, T... defaultValue)
           
static int getInt(Properties p, String property, int defaultValue)
           
static long getLong(Properties p, String property, long defaultValue)
           
static
<T extends Enum<T>>
T
valueOf(Class<T> enumType, String name)
          Use this instead of Enum.valueOf() when you want to ensure that the the enum values are case insensitive.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Options

public Options()
Method Detail

getInt

public static int getInt(Properties p,
                         String property,
                         int defaultValue)

getLong

public static long getLong(Properties p,
                           String property,
                           long defaultValue)

getBoolean

public static boolean getBoolean(Properties p,
                                 String property,
                                 boolean defaultValue)

getEnum

public static <T extends Enum<T>> T getEnum(Properties p,
                                            String property,
                                            T defaultValue)

getEnums

public static <T extends Enum<T>> Set<T> getEnums(Properties p,
                                                  String property,
                                                  T... defaultValue)

valueOf

public static <T extends Enum<T>> T valueOf(Class<T> enumType,
                                            String name)
Use this instead of Enum.valueOf() when you want to ensure that the the enum values are case insensitive.

Type Parameters:
T -
Parameters:
enumType -
name -
Returns:


Copyright © 1999-2011 The Apache OpenEJB development community. All Rights Reserved.