OutputPropertyUtilspublic final class OutputPropertyUtils extends Object This class contains some static methods that act as helpers when parsing a
Java Property object.
This class is not a public API.
It is only public because it is used outside of this package. |
Methods Summary |
---|
public static boolean | getBooleanProperty(java.lang.String key, java.util.Properties props)Searches for the boolean property with the specified key in the property list.
If the key is not found in this property list, the default property list,
and its defaults, recursively, are then checked. The method returns
false if the property is not found, or if the value is other
than "yes".
String s = props.getProperty(key);
if (null == s || !s.equals("yes"))
return false;
else
return true;
| public static int | getIntProperty(java.lang.String key, java.util.Properties props)Searches for the int property with the specified key in the property list.
If the key is not found in this property list, the default property list,
and its defaults, recursively, are then checked. The method returns
false if the property is not found, or if the value is other
than "yes".
String s = props.getProperty(key);
if (null == s)
return 0;
else
return Integer.parseInt(s);
|
|