/*
 * @require jade.js
 */
jade.Config=function(a,b){if(b){this.prefix=b}this.values=a?a:{}
};jade.Config.prototype.prefix=null;jade.Config.prototype.values=null;jade.Config.prototype.getAbsoluteKey=function(a){if(a==null){throw new Error("key must be set")
}a=a.toString();if(this.prefix){a=this.prefix+"."+a}return a};jade.Config.prototype.getValue=function(b,a){var c;
c=this.values[this.getAbsoluteKey(b)];if(c!=null){return c}if(a!=null){return a}return null
};jade.Config.prototype.getInt=function(b,a){var c;c=this.getValue(b,a);if(c==null){return null
}return parseInt(c)};jade.Config.prototype.getFloat=function(b,a){var c;c=this.getValue(b,a);
if(c==null){return null}return parseFloat(c)};jade.Config.prototype.getString=function(b,a){var c;
c=this.getValue(b,a);if(c==null){return null}return c.toString()};jade.Config.prototype.getBoolean=function(b,a){var c;
c=this.getValue(b,a);if(c==null){return null}if(c.toString().toLowerCase()=="true"){return true
}if(c.constructor==String){return false}return !!c};jade.Config.prototype.setValue=function(a,b){if(a==null){throw new Error("key must be set")
}this.values[this.getAbsoluteKey(a)]=b};jade.Config.prototype.setValues=function(a){var b,c;
for(b in a){c=a[b];if(c!=null){this.values[this.getAbsoluteKey(b)]=c}}};jade.Config.prototype.removeValue=function(a){delete this.values[this.getAbsoluteKey(a)]
};jade.Config.prototype.hasValue=function(a){return this.values[this.getAbsoluteKey(a)]!=null
};jade.Config.prototype.getSubConfig=function(a){return new jade.Config(this.values,this.getAbsoluteKey(a))
};jade.Config.prototype.clear=function(){var a,b;b=this.prefix?(this.prefix+"."):null;
for(a in this.values){if(!b||a.indexOf(b)==0){delete this.values[a]}}};jade.config=new jade.Config();