Save This Page
Home » hibernate-search-src-20081106 » org.hibernate.search.backend.configuration » [javadoc | source]
org.hibernate.search.backend.configuration
abstract public class: ConfigurationParseHelper [javadoc | source]
java.lang.Object
   org.hibernate.search.backend.configuration.ConfigurationParseHelper
Helper class to avoid managing NumberFormatException and similar code and ensure consistent error messages across Configuration parsing problems.
Method from org.hibernate.search.backend.configuration.ConfigurationParseHelper Summary:
getIntValue,   parseBoolean,   parseInt,   parseInt
Methods from java.lang.Object:
equals,   getClass,   hashCode,   notify,   notifyAll,   toString,   wait,   wait,   wait
Method from org.hibernate.search.backend.configuration.ConfigurationParseHelper Detail:
 public static final int getIntValue(Properties cfg,
    String key,
    int defValue) 
    Looks for a numeric value in the Properties, returning defValue if not found or if an empty string is found. When the key the value is found but not in valid format a standard error message is generated.
 public static final boolean parseBoolean(String value,
    String errorMsgOnParseFailure) 
    Parses a string to recognize exactly either "true" or "false".
 public static final int parseInt(String value,
    String errorMsgOnParseFailure) 
    Parses a String to get an int value.
 public static final int parseInt(String value,
    int defValue,
    String errorMsgOnParseFailure) 
    In case value is null or an empty string the defValue is returned