xdoclet.util

Class TypeConversionUtil

public final class TypeConversionUtil extends Object

Version: $Revision: 1.5 $

Author: Ara Abrahamian (ara_e@email.com)

UNKNOWN: Oct 15, 2001

Method Summary
static booleanstringToBoolean(String in, boolean defaultValue)
A utility method for converting a string to a boolean.

Method Detail

stringToBoolean

public static boolean stringToBoolean(String in, boolean defaultValue)
A utility method for converting a string to a boolean. "yes", "no", "true", "false", "1", "0", "on" and "off" are valid values for a boolean string (ignoring case). If not one of then then the value of defaultValue parameter is returned.

Parameters: in The String to convert defaultValue Description of Parameter

Returns: true or false