(Prop<?> prop, boolean def)
| 550 | } |
| 551 | |
| 552 | public boolean isTrue(Prop<?> prop, boolean def) { |
| 553 | if (!dictionary.containsKey(prop)) return def; |
| 554 | |
| 555 | Object p = dictionary.get(prop); |
| 556 | if (p == null) return def; |
| 557 | if (p instanceof Boolean) return ((Boolean) p); |
| 558 | if (p instanceof Number) return ((Number) p).intValue() > 0; |
| 559 | if (p instanceof String) return ((String) p).length() > 0; |
| 560 | return true; |
| 561 | } |
| 562 | |
| 563 | |
| 564 | public <T> Dict put(Prop<T> key, T value) { |
no test coverage detected