Config Class

Provides thread-safe methods used to get and set application variables.

Constructors

public Config( )

Methods

get( String key ) returns JSONValue
Returns the value for a given key.
getDatabase( ) returns javaxt.sql.Database
getDatabase( JSONValue val ) returns javaxt.sql.Database
getDatabase( JSONObject json ) returns javaxt.sql.Database
getKeys( ) returns java.util.ArrayList
Returns a list of keys found in the config.
has( String key ) returns boolean
Returns true if the config has a given key.
init( JSONObject json ) returns void
Used to initialize the config with a given JSON document. This will replace any previously assigned config values.
isEmpty( ) returns boolean
Returns true if there are no entries in the config.
set( String key, Object value ) returns void
Used to set the value for a given key.
setDatabase( javaxt.sql.Database database ) returns void
toJson( ) returns JSONObject
Returns the current config in JSON notation.