Cytoscape 2.7.0 (c) 2006,2007 ISB, MSKCC, UCSD

cytoscape.util
Class PropUtil

java.lang.Object
  extended by cytoscape.util.PropUtil

public class PropUtil
extends Object

A stateless utility class that makes it easy to parse int and boolean values from a Properties object.


Method Summary
static boolean getBoolean(Properties props, String key, boolean defaultValue)
          Will return a boolean for the specified property key only if the value exists and if the string matches "true", "false", "yes", or "no" in a case insensitive manner.
static int getInt(Properties props, String key, int defaultValue)
          Will return an integer for the specified property key only if the value exists and is properly formatted as an integer.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getInt

public static int getInt(Properties props,
                         String key,
                         int defaultValue)
Will return an integer for the specified property key only if the value exists and is properly formatted as an integer. Otherwise it will return the defaultValue.


getBoolean

public static boolean getBoolean(Properties props,
                                 String key,
                                 boolean defaultValue)
Will return a boolean for the specified property key only if the value exists and if the string matches "true", "false", "yes", or "no" in a case insensitive manner. Otherwise it will return the defaultValue.


www.cytoscape.org