I now created a delegate for JFig, just to add 2 more helper methodes:
getArrayValue with a given separator (one with and one without a notFoundValue param).
Maybe they can be included into JFig directly.
/** * @param section * @param key * @param separator * @return */ public String[] getArrayValue(String section, String key, char separator) throws JFigException { String value = getValue(section, key); return JFigUtility.stringToArray(value, String.valueOf(separator)); }
/** * @param section * @param key * @param notFoundValue * @param separator * @return */ public String[] getArrayValue(String section, String key, String notFoundValue, char separator){ String value = getValue(section, key, notFoundValue); return JFigUtility.stringToArray(value, String.valueOf(separator)); }
Stefaan
Log in to post a comment.
I now created a delegate for JFig, just to add 2 more helper methodes:
getArrayValue with a given separator (one with and one without a notFoundValue param).
Maybe they can be included into JFig directly.
/**
* @param section
* @param key
* @param separator
* @return
*/
public String[] getArrayValue(String section, String key, char separator) throws JFigException {
String value = getValue(section, key);
return JFigUtility.stringToArray(value, String.valueOf(separator));
}
/**
* @param section
* @param key
* @param notFoundValue
* @param separator
* @return
*/
public String[] getArrayValue(String section, String key, String notFoundValue, char separator){
String value = getValue(section, key, notFoundValue);
return JFigUtility.stringToArray(value, String.valueOf(separator));
}
Stefaan