if(log.isErrorEnabled()) log.error("window_size and min_threshold have to be both set if one of them is set");
log.error("window_size and min_threshold have to be both set if one of them is set");
    public boolean setProperties(Properties props) {        String     str;	long[]     tmp;        str=props.getProperty("timeout");        if(str != null) {	    tmp=Util.parseCommaDelimitedLongs(str);	    if(tmp != null && tmp.length > 0)		timeout=tmp;            props.remove("timeout");        }        str=props.getProperty("window_size");        if(str != null) {            window_size=Integer.parseInt(str);            props.remove("window_size");        }        str=props.getProperty("min_threshold");        if(str != null) {            min_threshold=Integer.parseInt(str);            props.remove("min_threshold");        }	str=props.getProperty("use_gms");        if(str != null) {	    use_gms=new Boolean(str).booleanValue();            props.remove("use_gms");        }        if(props.size() > 0) {            System.err.println("UNICAST.setProperties(): these properties are not recognized:");            props.list(System.out);            return false;        }	// Some sanity checks	if((window_size > 0 && min_threshold <= 0) || (window_size <= 0 && min_threshold > 0)) {	    if(log.isErrorEnabled()) log.error("window_size and min_threshold have to be both set if one of them is set");	    return false;	}	if(window_size > 0 && min_threshold > 0 && window_size < min_threshold) {	    if(log.isErrorEnabled()) log.error("min_threshold (" + min_threshold +			") has to be less than window_size (" + window_size + ")");	    return false;	}        return true;    }