(Prop<? extends Collection<T>> key, T value)
| 611 | |
| 612 | |
| 613 | public <T> Dict putToList(Prop<? extends Collection<T>> key, T value) { |
| 614 | |
| 615 | if (key.toCanon().autoConstructor != null) { |
| 616 | Collection<T> c = (Collection<T>) dictionary.computeIfAbsent(key, (k) -> key.toCanon().autoConstructor.get()); |
| 617 | c.add(value); |
| 618 | return this; |
| 619 | } else { |
| 620 | Collection<T> c = (Collection<T>) dictionary.computeIfAbsent(key, (k) -> new ArrayList<T>()); |
| 621 | c.add(value); |
| 622 | return this; |
| 623 | } |
| 624 | } |
| 625 | |
| 626 | public <T> Dict putToList(Prop<? extends Collection<T>> key, T value, Supplier<? extends Collection<T>> def) { |
| 627 |
no test coverage detected