1 | static Collection similarEmptyCollection(Collection c) {
|
2 | if (c cast L) ret similarEmptyList(c); |
3 | if (c cast Set) ret similarEmptySet(c); |
4 | ret new L; |
5 | } |
Began life as a copy of #1007943
download show line numbers debug dex old transpilations
Travelled to 7 computer(s): bhatertpkbcr, cfunsshuasjs, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tvejysmllsmz, vouqrxazstgt
No comments. add comment
| Snippet ID: | #1022633 |
| Snippet name: | similarEmptyCollection - make an effort to create an empty collection of same type. defaults to list |
| Eternal ID of this version: | #1022633/1 |
| Text MD5: | 045cabe8e24ddc3ba294dd4a366ee72b |
| Author: | stefan |
| Category: | javax |
| Type: | JavaX fragment (include) |
| Public (visible to everyone): | Yes |
| Archived (hidden from active list): | No |
| Created/modified: | 2019-03-25 13:40:01 |
| Source code size: | 158 bytes / 5 lines |
| Pitched / IR pitched: | No / No |
| Views / Downloads: | 505 / 549 |
| Referenced in: | [show references] |