Checks if a config option is set. Example usage: def config = new ConfigSlurper().parse("foo { password='' }") assert config.foo.isSet('password') assert config.foo.isSet('username') == false The check works only for options one bloc
(String option)
| 434 | * @since 2.3.0 |
| 435 | */ |
| 436 | public Boolean isSet(String option) { |
| 437 | if (delegateMap.containsKey(option)) { |
| 438 | Object entry = delegateMap.get(option); |
| 439 | if (!(entry instanceof ConfigObject) || !((ConfigObject) entry).isEmpty()) { |
| 440 | return Boolean.TRUE; |
| 441 | } |
| 442 | } |
| 443 | return Boolean.FALSE; |
| 444 | } |
| 445 | |
| 446 | /** |
| 447 | * Renders this config object using config-script syntax. |